|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
PHP connect to MYSQL problem
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? 3. 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!!! |
|
#2
|
|||
|
|||
|
RE: PHP connect to MYSQL problem
You should try to test your mysql server from shell first.
|
|
#3
|
|||
|
|||
|
RE: PHP connect to MYSQL problem
yes, i ve tested. the mysql server works well itself, but got problem with php.
|
|
#4
|
||||
|
||||
|
RE: PHP connect to MYSQL problem
Please do not post the same thread in multiple places.
Thank you Andrew |
|
#5
|
|||
|
|||
|
RE: PHP connect to MYSQL problem
|
|
#6
|
|||
|
|||
|
RE: PHP connect to MYSQL problem
guys, thanks for help. and i ve solved the problem by re-configuing everything.
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > PHP connect to MYSQL problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|