From: runar dot orested at gmail dot com
Operating system: Windows XP
PHP version: 5.3.1
PHP Bug Type: MySQL related
Bug description: Can't connect to MySQL database
Description:
------------
This version of php (5.3.1, threadsafe, vc6) fails to connect to MySQL
server 5.1. Apache is also the latest version (2.2.14).
It hangs (stalls for more of a minute even with shorter scripts timeouts,
no dr. watson notification) when using host = 'localhost' (pipes), seems to
work with host = '127.0.0.1'.
Fails with both 'mysql' and mysqli' libraries.
No bugs appear on any logs or on the page, it just hangs for a minute and
closes the tread.
Reproduce code:
---------------
$link = MySQL_Connect('localhost', 'root', 'root') or die('cannot
connect');
$result = MySQL_Query('show databases', $link) or die('cannot exec');
echo 'Connection ok';
while (false != ($row = MySQL_Fetch_Assoc($result)))
{
print_r($row);
}
Expected result:
----------------
It should eighter work or produce a error, not hang. Maybe a problem with
the pipes? As a workaround, how can you force always a network connection?
--
Edit bug report at http://bugs.php.net/?id=50439&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50439&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50439&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50439&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50439&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=50439&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50439&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=50439&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=50439&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=50439&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=50439&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=50439&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=50439&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=50439&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50439&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50439&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50439&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=50439&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=50439&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=50439&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=50439&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=50439&r=mysqlcfg