简体   繁体   English

phpinfo()与pdo_mysql的php-i不同

[英]phpinfo() different from php-i for pdo_mysql

I have a serious problem when installing my php extension pdo_mysql. 安装php扩展名pdo_mysql时遇到严重问题。

my phpinfo() shows that mysql is not enabled, but when i do php-i, or php-m , mysql is enabled. 我的phpinfo()显示未启用mysql,但是当我执行php-i或php-m时,启用了mysql。 I've checked my php.ini, and I've made the correct changes in the correct loaded php.ini: my extension_dir, and extension= are correct too. 我检查了我的php.ini,并在正确加载的php.ini中进行了正确的更改:我的extension_dir和extension =也正确。

My OS : mac os x 10.5 我的操作系统:mac os x 10.5

I cannot understand why mysql isn't enabled in my phpinfo()!! 我不明白为什么我的phpinfo()中没有启用mysql! Please help me on this one, i've been stuck for days! 请帮我解决这个问题,我已经被困了好几天了!

The php.ini used by the command line and the web server may not be the same. 命令行和Web服务器使用的php.ini可能不同。 Check the phpinfo's "Loaded Configuration File" to make sure you're editing the right one. 检查phpinfo的“已加载配置文件”,以确保您正在编辑正确的文件。

Check the lines: 检查行:

pdo_mysql.default_socket=/var/mysql/mysql.sock pdo_mysql.default_socket = /变种/ MySQL的/的mysql.sock

mysql.default_socket = /var/mysql/mysql.sock mysql.default_socket = /var/mysql/mysql.sock

mysqli.default_socket = /var/mysql/mysql.sock mysqli.default_socket = /var/mysql/mysql.sock

OSX creates the mysql.sock in /tmp/mysql.sock by default, so you may need to update those lines. OSX默认在/tmp/mysql.sock中创建mysql.sock,因此您可能需要更新这些行。

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

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