I'm a complete beginner at this, but I've set up an EC2 server and I'm trying to develop a simple php-mysql based website.
I've managed to get apache2 running and I've got a domain pointed to the server. I'm trying to set up a very simple php script to attach to a database. The following script runs perfectly well when I use the command line php simple_script.php
<?php
echo "Hello\n";
$con = mysql_connect("localhost","james","<password>");
if($con){
echo "Connected\n";
}
?>
However, when I go to www.myurl.com/simple_script.php I only see the line "Hello". Any help would be gratefully received!
OK, so I've checked the apache error log, which is saying this:
PHP Fatal error:  Call to undefined function mysql_connect() in /var/www/www.myurl.com/simple_script.php on line 5
Any ideas how to resolve this?


