468,284 Members | 1,505 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,284 developers. It's quick & easy.

Fatal Error: Win2003 & mysql_connect function [PLEASE HELP]

I am running Win2k3 Server and when I try to use the mysql_connect
function I am getting an error:

Fatal error: Call to undefined function mysql_connect() in
C:\Inetpub\wwwroot\programs\index.php on line 8

Now, I def know I've configured my php.ini correctly (its literally the
same as my XP machine) and I know that mysql works fine with PHP as I
can run it from the command line :D
I've got the files (tried in multiple places - but happiest with it in
my php & php/ext dirs with Windows path set.)
PHP 5 is running as an ISAPI (for some reason I cant get the CGI to
parse php files).
I have amended my php.ini with the doc_root, and cgi-force_redirect and
extension dir - all the permissions on my php / inetpub folders have
been given set for iusr, iwam and IWG full control (purely for
MySQL is 4.1, IIS 6.0 on Windows 2003 with PHP 5.

Its caused me lots of grief so any help would be much appreciated!



Jul 17 '05 #1
2 1784
Make a call to phpinfo() and tell me exactly what the value of:
"Configuration File (php.ini) Path" is. Also, you should use the mysqli
extension with MySQL 4.1+

Remember, PHP 5 requires mysql a dll file loaded in php.ini whereas PHP
4 does not. See the manual for details.

Jul 17 '05 #2
Thanks Philip, I can blatantly see that my PHP path is set to
c:\windows when the php.ini doesnt even exist in that dir!
This is my first Win2003 install (I've usually used WinXP/2000) and
I've come across quite a few differences with configuring for 2003.
Sure enough as soon as I put a copy in c:\windows - phpinfo displays
the filename as well as the path!
I soon found a way to correct the php.ini file location by creating a
registry file as follows:


A quick restart of IIS6 and it all works fine.
Thank you very much for your help Philip!

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by gc | last post: by
reply views Thread by NPC403 | last post: by
2 posts views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.