You probably have not loaded the apache2mod_php, or apache2mod_mysql, got to install software and find the application
install and restart apache with
apachectl stop
apachectl start
Ensure the mysql server is started by checking for mysql
check the module is working with making a text file
<? phpinfo() ?>
put it into your website in /var/www/html as test.php then
with your browser type
http://localhost/test.php
This will tell you if the mysql is loaded in apache and the location of all the files etc for mysql.
