Setup:
Two separate boxes:
- Fedora 15, Apache, PHP and PHP modules
- Fedora 15, MySQL
I am unable to make a connection to mysql from Apache web server.
<?php
echo "<br>begin test<br>";
mysql_connect('hostname[FQDN]','username','password') or ("Error" . mysql_error());
echo "<br>end test<br>";
?>
the 'begin test' text is being displayed but no mysql error or the 'end test' text when Apache serves the page.
I am able to connect to the MySQL DB using the MySQL workbench on port 3306 from a remote machine. Privileges and access to the user and IP address have been left completely open (%) to avoid any issues in those respects.
yum install php-mysql– Wrikken Jul 28 '11 at 21:07/var/log/httpd/error_log– Zypher♦ Jul 28 '11 at 21:11