简体   繁体   English

在Ubuntu Linux上缺少PHPinfo中的MySQL

[英]Missing MySQL in PHPinfo on Ubuntu Linux

I am working on a newly built Ubuntu server with Apache2, MySQL 5 and PHP 5.3.2 . 我正在使用Apache2,MySQL 5和PHP 5.3.2在新构建的Ubuntu服务器上工作。 It seems something is incomplete in the configuration. 在配置中似乎有些不完整。 When I call phpinfo() there is no MySQL section in it. 当我调用phpinfo()时,其中没有MySQL部分。 However, the "Additional .ini files parsed" section shows "/etc/php5/apache2/conf.d/mysql.ini, /etc/php5/apache2/conf.d/mysqli.ini, /etc/php5/apache2/conf.d/pdo.ini, /etc/php5/apache2/conf.d/pdo_mysql.ini " 但是,“解析附加.ini文件”部分显示“/etc/php5/apache2/conf.d/mysql.ini,/etc/php5/apache2/conf.d/mysqli.ini,/ etc / php5 / apache2 / conf.d / pdo.ini,/ etc / php5 / apache2 / conf.d / pdo_mysql.ini“

In my research I have seen references to uncommenting an extension line in the PHP .ini file, but I don't see any line like that in my .ini. 在我的研究中,我看到了在PHP .ini文件中取消注释扩展行的引用,但我在.ini中看不到任何类似的行。

I have been using MySQL from a remote GUI for a week with no problems, so I know the database install is fine. 我一直在远程GUI中使用MySQL一周没有问题,所以我知道数据库安装没问题。 PHP runs completely normal except for not talking to MySQL. PHP运行完全正常,除了不与MySQL交谈。

Any suggestions would be greatly appreciated. 任何建议将不胜感激。

Thank you for taking the time to read my question. 感谢您抽出宝贵时间阅读我的问题。 Paul 保罗

Fixed it by running sudo apt-get install php5-mysql . 通过运行sudo apt-get install php5-mysql修复它。 Found this solution at http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-10.04-lamp-p2 http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-10.04-lamp-p2找到此解决方案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM