Forum Moderators: coopster
My problem:
ZoneAlarm seems to prevent PHP and MySQL from working properly
together.
Details:
I was using Norton's Firewall until the free trial expired. With
Norton, I was able to run MySQL dependent PHP scripts without any
problems.
Now, with ZoneAlarm (free), it gives me PHP, but seems to fail with
MySQL connects (see quoted Firefox screen at end).
A php_info() based test script shows that PHP is working.
I have switched off Windows firewall to avoid firewall conflicts.
In Zone Alarm, I've designated "localhost" as trusted, and, in ZA's
program control, am allowing ZA, PHP, Apache, and MySQL full access.
In task manager, mysql-nt.exe and mysql.exe are running.
The status report in MySQL tells me the following that the connection
is "localhost via TCP/IP" and the tcp port is "3306".
My set-up (offline, for learning):
Windows XP SP2, Apache 2.0.52, PHP Version 5.0.2, MySQL Server 4.1.7-
nt, ZoneAlarm 5.5, Mozilla/5.0 (Firefox/1.0)
I've made it through many installation hiccups but now feel completely
stuck. I've checked around many forums but still not found a solution.
I would be very grateful if someone could help me out on this.
Thank you.
Seb
P.S. Below is a typical example of what I see in my browser when trying
to run a script with MySQL:
FIREFOX_QUOTE view_blog.php Script 12.6 (from Ullman's PHP book)Could not select the database because: ' . mysql_error() . ''); } }
else { die ('
Could not connect to MySQL because: ' . mysql_error() . '
'); } //define the query $query = 'SELECT * FROM blog_entries ORDER BY
date_entered DESC'; if ($r = mysql_query ($query)) { //run the query
//retrieve and print every record while ($row = mysql_fetch_array ($r))
{ print "
{$row['title']}
{$row['entry']}
EditDelete\n\r"; } } else { //query didn't run die ('
Could not retrieve the data because: ' . mysql_error() . ". The query
was $query.
"); } //END OF query IF mysql_close(); //close the database connection
?>
FIREFOX_QUOTE END