Can´t connect to MySQL thru PHP on WinXP
I feel like I’ve tried everything. I’ve got copies of libmysql.dll all over the place, same with php_mysqli.dll and php_mysql.dll. The php.ini is in my C:\Windows directory, with the following extensions enabled thusly:
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_mysqli.dll
MySQL seems to be working fine. I use Navicat and I can see my data dandy. PHP seems to be working fine too. A call to phpinfo shows lotsa stuff, though no mention of mysql. A snippet(I’m no php expert) like
if (mysql_connect(’localhost’,'root’,'mypassword’)) {
if (mysql_select_db(’mysql’)) {
echo "connected
}
} else {
echo "cannot connect to database";
}
gives absoutely no output whatsoever. At least I’d like to see a message telling me I can’t connect.
I’ve spent way, way too many hours on this and I don’t know where to go for help.
Thanks,
Dave Fobare
Versions:
OS: WinXP Pro
Web Server: IIS
MySQL: 5.0.27-community-nt
PHP: 5
