使php支持pdo_mysql
1.下载pdo_mysql包
wget https://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz
2.追加编译php,使其module目录下生产pdo_mysql.so的文件
tar zxf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/tcrm/php/bin/php-config --with-pdo-mysql=/usr/local/mysql
make && make install
系统会提示模块生成在/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/这个目录下
3.修改php.ini这个文件:
extension_dir = "/usr/local/tcrm/php/lib/php/extensions/no-debug-non-zts-20060613/"
extension=pdo_mysql.so
wget https://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz
2.追加编译php,使其module目录下生产pdo_mysql.so的文件
tar zxf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/tcrm/php/bin/php-config --with-pdo-mysql=/usr/local/mysql
make && make install
系统会提示模块生成在/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/这个目录下
3.修改php.ini这个文件:
extension_dir = "/usr/local/tcrm/php/lib/php/extensions/no-debug-non-zts-20060613/"
extension=pdo_mysql.so
4.重启apache或nginx(fastcGI)使其重新加载php配置文件。