ID:               38230
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tianlianna at yahoo dot com dot sg
-Status:           Open
+Status:           Feedback
 Bug Type:         MySQL related
 Operating System: Mac OS X 10.4.7
 PHP Version:      5.1.4
 New Comment:

Turn on the error messages.
error_reporting(E_ALL);
and display_errors = On 


Previous Comments:
------------------------------------------------------------------------

[2006-07-27 05:14:13] tianlianna at yahoo dot com dot sg

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"


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38230&edit=1

Reply via email to