#41579 [NEW]: PDO timeout lost connection
From: vtsupermok at gmail dot com
Operating system: Window
PHP version: 5.2.3
PHP Bug Type: PDO related
Bug description: PDO timeout lost connection
Description:
------------
I create a pdo object and set PDO::ATTR_PERSISTENT => true, after serveral
hours I run my programme again. Suppose the connection will be timeout and
then the program throw a PDOException.
But the real situation is it said time out lost connection but it wouldn't
return a PDOException.
Reproduce code:
---------------
$db=array(
'name'=>'abc',
'host'=>'127.0.0.1',
'port'=>'3306',
'userID'=>'123',
'userPwd'=>'123',
'charset'=>'latin1',
'encoding'=>'big-5'
);
try{
$database="mysql:host={$db['host']};port={$db['port']};dbname={$db['name']}";
$pdo = new PDO($database, $db['userID'], $db['userPwd'],
array(PDO::ATTR_PERSISTENT => true));
} catch (PDOException $e) {
throw $e;
}
Expected result:
----------------
throw a exception.
Actual result:
--------------
the mysql error is timeout lost connection but it would't throw a
exception
--
Edit bug report at http://bugs.php.net/?id=41579&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41579&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41579&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41579&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41579&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41579&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41579&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41579&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41579&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41579&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41579&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41579&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41579&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41579&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41579&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41579&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41579&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41579&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41579&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41579&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41579&r=mysqlcfg
Thread (13 messages)
- vtsupermok at gmail dot com
- tony2001@php.net#41579 [Opn->Fbk]: PDO timeout lost connection
- vtsupermok at gmail dot com#41579 [Fbk->Opn]: PDO timeout lost connection
- tony2001@php.net#41579 [Opn->Fbk]: PDO timeout lost connection
- vtsupermok at gmail dot com#41579 [Fbk->Opn]: PDO timeout lost connection
- vtsupermok at gmail dot com#41579 [Opn]: PDO timeout lost connection
- tony2001@php.net#41579 [Opn->Fbk]: PDO timeout lost connection
- tony2001@php.net#41579 [Fbk]: PDO timeout lost connection
- vtsupermok at gmail dot com#41579 [Fbk->Opn]: PDO timeout lost connection
- tony2001@php.net#41579 [Opn->Fbk]: PDO timeout lost connection
- vtsupermok at gmail dot com#41579 [Fbk->Opn]: PDO timeout lost connection
- tony2001@php.net#41579 [Opn->Fbk]: PDO timeout lost connection
- vtsupermok at gmail dot com#41579 [Fbk->Csd]: PDO timeout lost connection