ID: 44471 User updated by: jad at hungover dot org Reported By: jad at hungover dot org -Status: Feedback +Status: Open Bug Type: MySQL related Operating System: RHEL3 PHP Version: 5.2.5 New Comment:
Sorry, that made no difference - same results as before. Previous Comments: ------------------------------------------------------------------------ [2008-03-18 21:47:40] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi ------------------------------------------------------------------------ [2008-03-18 17:57:14] jad at hungover dot org Description: ------------ When using mysql_connect with host:port parameter, with port other than 3306, the connection times out. Am able to telnet to the DB host on the alternative port, with mysql responding as expected. Tried using latest snapshot, as well as 5.2.5 Reproduce code: --------------- <? if( mysql_connect('192.168.151.116:3306','foo','**********') ) { print "3306 connected OK\n"; } else { print "3306 failed connect\n"; } if( mysql_connect('192.168.151.116:3307','foo','**********') ) { print "3307 connected OK\n"; } else { print "3307 failed connect\n"; } ?> Expected result: ---------------- 3306 connected OK 3307 connected OK Actual result: -------------- [EMAIL PROTECTED] default]# /root/newphp/php5.2-200803181530/sapi/cli/php test.php 3306 connected OK Warning: mysql_connect(): Can't connect to MySQL server on '192.168.151.116' (4) in /var/www/sites/default/htdocs/test.php on line 7 3307 failed connect [EMAIL PROTECTED] default]# ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44471&edit=1