php串連mysql資料庫出現有關問題 找不到指定的程式
最後更新:2016-06-13
來源:互聯網
上載者:User
php串連mysql資料庫出現問題 找不到指定的程式
啟動apache時
有如下 提示
PHP Startup:Unable to load dynamic library 'd:\php5.0.0\ext\php_mysql.dll'-找不到指定的程式
我看了下 在這個目錄中有這個檔案
在php.ini中 我己經去掉了相對應的extension的分號
不知道什麼原因
------解決方案--------------------
將libmysql.dll copy到apache的目錄或者system32目錄下。重啟。
如果不行再將php_mysql.dll copy到apache目錄或者system32目錄。重啟
------解決方案--------------------
如果將libmysql.dll php_mysql.dll都copy到system32下,還不行
哪我也不知道了.
------解決方案--------------------
php5根目錄下的php5ts.dll、libmysql.dll、libmcrypt.dll這三個檔案放到系統的system32目錄下
我是用IIS建的,不知道APACHE是不是一樣。你把原來裝的刪掉再重新裝一遍試試,我開始也是出現連結不到資料庫,就是這步忘記了。
------解決方案--------------------
http://cn.php.net/manual/en/mysql.installation.php
PHP 5+
Note: If when starting the web server an error similar to the following occurs: "Unable to load dynamic library './php_mysql.dll'", this is because php_mysql.dll and/or libmysql.dll cannot be found by the system.
還有就是確定你的apache讀的是那個php.ini檔案,使用phpinfo()看看