Linux下安装PHP pdo_mysql支持
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-04-21
Linux下安装PHP pdo_mysql支持
后勤的网站(彭同学做的)使用了pdo来操作数据库,服务器在配置是未编译pdo支持,遂给www服务器加上此功能的
支持.
5.2.9,最终没有成功
1.安装pdo /usr/local/php/bin/pecl install pdo 2.安装pdo_mysql wget http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz tar xzvf PDO_MYSQL-1.0.2.tgz cd PDO_MYSQL-1.0.2 /usr/local/php/bin/phpize ./configure –with-php-config=/usr/local/php/bin/php-config –with-pdo-mysql=/usr/local/mysql make make install 3.修改php.ini 加入: extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/pdo.so extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so /usr/local/php/bin/php -v PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/modules//usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/pdo.so’ - /usr/lib/php/modules//usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0 拥有帝国一切,皆有可能。欢迎访问phome.net PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/modules//usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so’ - /usr/lib/php/modules//usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: Zend Optimizer does not support this version of PHP - please upgrade to the latest version of Zend Optimizer in Unknown on line 0 PHP 5.2.9 (cli) (built: Nov 30 2009 15:00:32) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies with Zend Extension Manager v1.0.10, Copyright (c) 2003-2006, by Zend Technologies 1.下载php 5.2.13 2.安装 tar zxvf php***** cd php** ./configure –prefix=/usr/local/php –with-apxs2=/usr/local/apache/bin/apxs –with-mysql=/usr/local/mysql/ –with-gd=/usr/local/gd/ –with-zlib-dir –with-png-dir –with-freetype-dir –with-jpeg-dir –enable-mbstring=all –with-curl –enable-pdo=shared –with-pdo-mysql=shared –with-sqlite=shared –with-pdo-sqlite=shared cp php.ini-dist /usr/local/php/lib/php.ini 拥有帝国一切,皆有可能。欢迎访问phome.net 3.修改php.ini 修改: extension_dir = “/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613″ 加入: extension=pdo.so extension=pdo_mysql.so 4.查看http://*****/phpinfo.ini 看到对pdo的支持,ok!有价值的资料: http://www.directadmin.com/forum/showthread.php?t=24448 http://www.spiration.co.uk/post/1332/install PDO_MYSQL - mysql_config and header files problem 拥有帝国一切,皆有可能。欢迎访问phome.net |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于Linux下安装PHP pdo_mysql支持的所有评论