From:             ken dot senior at nrl dot navy dot mil
Operating system: Linux 2.6.11-1.1369_FC4
PHP version:      5.0.4
PHP Bug Type:     MySQL related
Bug description:  mysql_connect can connect via localhost but *not* via TCP/IP

Description:
------------
Just installed FC4 OS, Apache, PHP, MySQL, and php-mysql (all via yum) and
discovered a strange bug when using PHP to connect to MySQL.  The only
connection which will work is to a local instance of MySQL via a socket,
i.e., localhost setting.  However, TCP/IP connections, both local as well
as to other remote MySQL servers, result in the PHP error:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL
server on '192.168.0.4' (13) in /var/www/html/IGStime/index.php on line
720
could't connect to MySQL server

Usually, the problem is just the opposite, that is being able to connect
via TCP/IP but not sockets.  Does anyone have a clue about this?

Ken Senior


-- 
Edit bug report at http://bugs.php.net/?id=34188&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34188&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34188&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34188&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34188&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34188&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34188&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34188&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34188&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34188&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34188&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=34188&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=34188&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34188&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34188&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34188&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34188&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34188&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34188&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34188&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34188&r=mysqlcfg

Reply via email to