|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-27 06:26 UTC] tony2001@php.net
[2006-07-28 12:03 UTC] tianlianna at yahoo dot com dot sg
[2006-07-28 16:47 UTC] bjori@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 08:00:01 2025 UTC |
Description: ------------ PHP and MySQL both works fine individually. but when i try to use mysql connect in php and save the code, the page doesn't load. it shows that it's trying to connect to localhost but it doesn't load eventually. the explorer just shows done with nothing being loaded. if i have a previous page on the explorer it will still be there and refresh will refresh that page. there are no error messages. someone please help me. Reproduce code: --------------- <?php $dbhost = 'localhost'; $dbuser = 'user'; $dbpass = 'password'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) if($conn) { echo $conn;}else{ die('Error connecting to mysql');} $dbname = 'test'; mysql_select_db($dbname); ?> Expected result: ---------------- either '1' or 'error connecting to mysql' Actual result: -------------- the page loads for a while but eventually doesn't load the page and shows a blank page but the status bar of the explorer indicates that the page is loaded or "done"