I posted another question that is similar to this but I believe this to be a separate issue. Accessing MySql Database from PHP file on local host
While trying to execute the following line
$db = mysql_connect('ipaddress','username','password!!') or die("Connection error");
On my local raspberry pi lamp web server I get a internal 500 server error. It doesn't matter if I try and connect to an external Database or the local one that I want. I get the same internal 500 error response.
update:
After checking the error.log file it appears this is the reported error
"Call to undefined function mysql_connect() in [path]"