phpinfo can't see mysql

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
tcl4p
Forum Newbie
Posts: 15
Joined: Mon Apr 02, 2007 9:28 am

phpinfo can't see mysql

Post by tcl4p »

I've installed php 5, apache 2.2.9 and mysql5 all without trouble. The only problem is when I run phpinfo() it can't see any mysql information and when I run a small script to connect to mysql I get an error: Fatal error: Call to undefined function mysql_connect(). I made sure that in my php.ini I uncommented the extension for mysql.dll and in the phpinfo() data I can see the path to mysql is there. Additionally, I've made all the suggested changes to httpd.conf including pointing the LoadModule and the DocumentRoot to the appropriate path. I can open phpmyadmin and see all of my table and the data, so I know mysql is running. If anyone has any suggestions I could use the help.

Thanks,
Tom

The script to connect is:
$link = mysql_connect('localhost', 'UID', 'PWD' );
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
marcth
Forum Contributor
Posts: 142
Joined: Mon Aug 25, 2008 8:16 am

Re: phpinfo can't see mysql

Post by marcth »

Are you running Linux? Windows? Mac? http://www.apachefriends.org/en/xampp-linux.html has a package that solves all those problems.
Post Reply