When I try to use mysql_connect() in a PHP script, I get the following message:
Fatal error: Call to undefined function: mysql_connect() in C:\HTTPD\HTDOCS\test.php on line 5
As far as I know, mysql is set up and running. I can get into the mysql program under a DOS prompt and make databases and tables and such. The green light icon is in my taskbar as well, which supposedly means the sql server is up and running.
Any ideas, anyone? Oh, I'm running win98 if it makes a difference.
you probably dont have the PHP mySQL module loaded ...
( my ONLY host ) ( geekarea.org )
[This message has been edited by Vinay (edited July 23, 2000).]
You definitely don't have the MySQL PHP module loaded. If you're using version 3.x of PHP under Windows, you'll need to edit your PHP3.ini (in your Windows directory) and uncomment the extension=php_mysql.dll line near the bottom of the file. Remove the semicolon at the start of the line, and make sure there are no spaces or other stray characters on the beginning of the line.
If this doesn't work, write back and we'll try something else...
Helping Small Business Grow Online!
I'm such a dope...I edited the local copy of php.ini that was put in my servers (omnihttpd)folder...and not the copy I put in c:\windows...so it was reading the wrong file. Works like a charm now http://www.SitePoint.com/forums/smile.gif thanks guys.