duanpao4172 2013-10-02 15:09
浏览 297

PHP PDO Mysql没有加载。 扩展名在extensions.ini中,php_mysql.so存在,但phpinfo只显示sqlite和dblib

I'm trying to get the mysql php pdo to work on FreeBSD 9.1.

Mysql version: 5.5.28 PHP Version: 5.4.7

Applicable Contents of Extensions.ini:

extension=pdo_dblib.so
extension=mysql.so
extension=pdo.so
extension=pdo_mysql.so
extension=pdo_sqlite.so

PHP Info:

PDO support enabled PDO drivers dblib, sqlite

PDO Driver for FreeTDS/Sybase DB-lib enabled Flavour freetds

PDO Driver for SQLite 3.x enabled SQLite Library 3.7.14.1


So, no pdo_mysql.so being loaded, even though the file exists, its in the extensions file etc. I've even tried commenting out the pdo.so and mdo_sqlite.so just to make sure the correct extension file was being loaded and for certain... It is.

Any ideas?

Thanks!

  • 写回答

1条回答 默认 最新

  • dsfdsf23423 2015-10-12 11:57
    关注
    • Check which php.ini loaded and if it is the same one you are modifying. on cli, do:

    php -i | head |grep -i loaded

    Or in some dummy php file:

    <?php
    phpinfo();
    ?>
    

    and then open that dummy file in the browser

    • Make sure the php mysql support package is installed.

    search for it (I am using ubuntu):

    apt-cache search php5*|grep mysql

    Install it (mine happened to be php5-mysql and i think yours would be the same too):

    sudo apt-get install php5-mysql
    

    check again after installing it if you get what you want :)

    评论

报告相同问题?

悬赏问题

  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥15 Python3.5 相关代码写作
  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗