How do I get PHP to work with ADOdb and MySQL?

冷暖自知 提交于 2019-12-11 04:12:49

问题


I'm trying to get a PHP site working in IIS on Windows Server with MySQL.

I'm getting this error…

Fatal error: Call to undefined function mysql_connect() in C:\inetpub...\adodb\drivers\adodb-mysql.inc.php on line 363


Update…

This link outlines the steps I followed to install PHP on my server:
How do I get PHP and MySQL working on IIS 7.0 ?
(note especially steps 6 and 8 regarting php.ini and php_mysql.dll).

Only two lines in the phpinfo report reference SQL:

<?php
    phpinfo();
?>

Configure Command:
cscript /nologo configure.js "--enable-snapshot-build" "--enable-mysqlnd"

sql.safe_mode:
Local Value Off, Master Value Off

PHP Configure Command http://img79.imageshack.us/img79/2373/configurecommandmw8.gif

PHP sql.safe_mode http://img49.imageshack.us/img49/3066/sqlsafemoderu6.gif


Update…

I found the solution: How do I install MySQL modules within PHP?


回答1:


Check out phpinfo to see if the mysql functions are compiled with your PHP

<?php
    phpinfo();
?>

Since in some versions of php, its not default with the install.

Edit for the Update:

You should have a full MySQL category in your phpinfo();

See this for example: https://secure18.easycgi.com/phpinfo.php (googled example)




回答2:


It sounds like the version of PHP you are using has not been compiled with MySQL support, or has not been enabled in the php.ini.




回答3:


Looks like you haven't got the MySQL PHP extensions installed! You shouldn't have to do any configuration other than installing the correct modules (and shouldn't be doing anything with ADODB).

PHP comes in 2 versions as well - a CGI version and an ISAPI module. You're best using the ISAPI version with ISS and adding all the trimmings...




回答4:


I found the solution: How do I install MySQL modules within PHP?



来源:https://stackoverflow.com/questions/155308/how-do-i-get-php-to-work-with-adodb-and-mysql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!