Hello,
Hi,
Windows XP Pro SP2
Apache 2.0.53
PHP 5.0.3
MySQL 4.1.10a
I just installed all above and the PHP runs on Apache successfully. However after I installed the MySql, and tired to use the following PHP code to test it, I failed:
<?php
mysql_connect("localhost", "root", "root") or die(mysql_error());
echo "Connected to MySQL<br />";
?>
root is both my username and pwd.
When I run the PHP page, nothing displayed on the page but a blank page. Actually I ve used certain diff. PHP code to test the MySQL connection, the result is same: An BLANK PAGE.
===============================
1.after that I checked the PHP Manual, it says the PHP5 doesnt support mysql as what PHP4 does. But I dont know how to exactly configure the PHP5 to support mysql?
2.somebody told me that the reason of the blank page is that the error_reporting is turned off in my php.ini(php.ini-recommended) which is copied into C:/windows/. But in the file:
error_reporting = E_ALL
does it mean the error_reporting is on?
- I also tried to use php.ini-dist instead of the recommeded, it sets:
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
however, when I try to run the code below:
<?php
asdfasdd
?>
still a blank page displayed.
=======
I think there are problems with my PHP/MySql settings, but I cnanot figure them out. any helps?
Thanks a lot!!!