PHP doesn't see mysql extension

前端 未结 5 570
猫巷女王i
猫巷女王i 2021-01-02 03:37

I\'m at a loss. I\'m on WIndows 7 and have installed both Apache 2.2.21 and PHP 5.2.17. I can not enable the mysql module. Is there a known issue on Windows 7?

I\

相关标签:
5条回答
  • 2021-01-02 04:12

    Note to any future information seekers, that mysql extension is deprecated in 5.5 and is gone by PHP 7, to be replaced my the mysqli extension.

    0 讨论(0)
  • 2021-01-02 04:18

    Have you tried putting php_mysql.dll in C:\windows\system32 directory? If you place the file there, restart your webserver and the module is loaded, then it could mean an environment variable issue, or an old version of php_mysql.dll is preventing the new one from being loaded properly.

    0 讨论(0)
  • 2021-01-02 04:20

    Have you tried forward slashes here?

    extension_dir = "C:/php/ext"
    

    It worked for me.

    0 讨论(0)
  • 2021-01-02 04:20

    Did you install MySQL? I remember I had some kind of that problem because I was expecting PHP to load MySQL extension, before installing MySQL to complete my localhost setup. The reason is when you install MySQL it puts some DLLs to system32 dir so then PHP can load it.

    0 讨论(0)
  • 2021-01-02 04:25

    You need php-mysql not just php. Installing that should take care of adding the right exgtensions to php.

    yum install php-mysql
    
    0 讨论(0)
提交回复
热议问题