Zack Peterson
Zack Peterson

Reputation: 57373

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

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?

Upvotes: 1

Views: 7090

Answers (4)

Zack Peterson
Zack Peterson

Reputation: 57373

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

Upvotes: 1

James Marshall
James Marshall

Reputation: 620

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...

Upvotes: 1

&#211;lafur Waage
&#211;lafur Waage

Reputation: 70011

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)

Upvotes: 4

Geoff
Geoff

Reputation: 3769

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.

Upvotes: 1

Related Questions