基本上,
我在我的脚本中遇到这个错误:
fatal error :在第 10 行调用/var/www/login/includes/db.php 中未定义的函数 mysql_connect()
我有未注释的扩展名:mysql.so
我不知道为什么它不起作用,也重新启动了一切。
我在 ubuntu 32 位上运行。 Apache/MYSQL 以完全权限安装。
这是我的 PHPInfo 页面:
System Linux rabbits.org 2.6.18-194.3.1.el5.028stab069.6 #1 SMP Wed May 26 19:05:45 MSD 2010 i686
Build Date Jan 6 2010 21:40:40
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php5/apache2
Loaded Configuration File /etc/php5/apache2/php.ini
Scan this dir for additional .ini files /etc/php5/apache2/conf.d
additional .ini files parsed /etc/php5/apache2/conf.d/pdo.ini
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams zip, php, file, data, http, ftp, compress.bzip2, compress.zlib, https, ftps
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.*
最佳答案
如果正确加载了 mysql,您会看到如下内容:
additional .ini files parsed /etc/php5/apache2/conf.d/pdo.ini,
/etc/php5/apache2/conf.d/mysql.ini
如果 mysql.ini(或 mysqli.ini)行不存在,则它没有被加载。
关于php - Apache/MySQL 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3782885/