MySQL Forums
Forum List  »  PHP

PHP Config Error: undefined function mysql_connect
Posted by: Mike Muldoon
Date: March 25, 2007 02:27PM

Hi All

This has kind of been asked before but I cannot find any answers that fix it for me. Basically I have set up my Apache (1.3.22) / PHP (5.2.1) / MySQL (5.0.37) environment. I edited the php.ini file, Windows path, httpd.conf file and managed to get PHP working with the Apache server fine. I installed mySQL and no problems there, I can query the test tables I have set up. However when I try to issue simple mysql_connect I get the undefined function error.

I know my php.ini file is setup corrently in terms of having the appropriate extensions being read, also from the correct directory. I know my path is setup. I have been through everthing that various website suggest.

The odd thing that I have noticed is that phpinfo() (apart from not having any mySQL sections) does not have the correct Configuration File in the path (it has C:\WINDOWS) and that is another thing should it not include the filename too (if it has actually found one)? I know there ia only one php.ini on my system and that is in the c:\Programs\php folder, there is none in the windows dir. So why is the Config File path wrong?

When I copy the php.ini file to the windows directory and restart the Apache server I am getting the mySQL information in phpinfo and I can make connections to the database. Any suggestions as to why the php.ini file is not being found outside of the windows directory?

Thanks in advance.

Mike

Options: ReplyQuote


Subject
Written By
Posted
PHP Config Error: undefined function mysql_connect
March 25, 2007 02:27PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.