troubleshooting Question

mysql_connect returns error 500

Avatar of detox1978
detox1978Flag for United Kingdom of Great Britain and Northern Ireland asked on
PHPMicrosoft IIS Web ServerMySQL Server
20 Comments1 Solution7003 ViewsLast Modified:
hi All,

I recently installed MySQL and PHP on a Windows SBS 2011 running IIS7.5

I can connect to MySQL and PHP is running ok.

However when I link the two together using the code below I get error 500

<?php 
$link = mysql_connect('host', 'user', 'password'); 
if (!$link) { 
die('Could not connect: ' . mysql_error()); 
} 
echo 'Connected successfully'; 
mysql_close($link); 
?>


Any suggestions?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 20 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 20 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros