问题描述:
sqlite_open() php报语法错误
分析:
没有安装php-sqlite扩展。
centos采用yum方式安装php后,源里面没有php-sqlite扩展,无法用yum安装它。
解决:
手动安装php-sqlite扩展
1、下载相应的php源码包,下载地址:http://php.net/releases/
wget http://museum.php.net/php5/php-5.3.3.tar.bz2
2、安装phpize命令
yum install php-devel
3、解压,安装:
tar xfvj php-5.2.10.tar.bz2
cd php-5.2.10/ext/sqlite/
phpize
./configure
make
make install
注:扩展文件位置为/usr/lib/php/modules/sqlite.so
4、使扩展生效:
vi /etc/php.d/sqlite.ini
在其中添加:
extension=sqlite.so
5、重启apache服务器
/etc/init.d/httpd restart
sqlite_open() php报语法错误
分析:
没有安装php-sqlite扩展。
centos采用yum方式安装php后,源里面没有php-sqlite扩展,无法用yum安装它。
解决:
手动安装php-sqlite扩展
1、下载相应的php源码包,下载地址:http://php.net/releases/
wget http://museum.php.net/php5/php-5.3.3.tar.bz2
2、安装phpize命令
yum install php-devel
3、解压,安装:
tar xfvj php-5.2.10.tar.bz2
cd php-5.2.10/ext/sqlite/
phpize
./configure
make
make install
注:扩展文件位置为/usr/lib/php/modules/sqlite.so
4、使扩展生效:
vi /etc/php.d/sqlite.ini
在其中添加:
extension=sqlite.so
5、重启apache服务器
/etc/init.d/httpd restart