From:             dima at dimych dot sumy dot ua
Operating system: FreeBSD 7.1
PHP version:      5.2.9
PHP Bug Type:     MySQL related
Bug description:  mysql_connect using TCP with connect_timeout not equal to -1

Description:
------------
connecting to mysql server using TCP 
with mysql.connect_timeout set not equal to "-1" in php.ini produces
error:
Can't connect to MySQL server on '127.0.0.1' (0)


Reproduce code:
---------------
1 in php.ini set:
   mysql.connect_timeout = 60

2 create user test with password test in local database

3 create file test.php:
<?php
mysql_connect("127.0.0.1", 'test', 'test');
?>

Expected result:
----------------
Successful connection to database like for:
<?php
mysql_connect("localhost", 'test', 'test');
?>
or connection to 127.0.0.1 with mysql.connect_timeout = -1




Actual result:
--------------
PHP Warning:  mysql_connect(): Can't connect to MySQL server on
'127.0.0.1' (0) in /usr/home/dima/test.php on line 2


-- 
Edit bug report at http://bugs.php.net/?id=47641&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=47641&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=47641&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=47641&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=47641&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47641&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=47641&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=47641&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=47641&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=47641&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=47641&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=47641&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=47641&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=47641&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=47641&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47641&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47641&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=47641&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=47641&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=47641&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=47641&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=47641&r=mysqlcfg

Reply via email to