Bug #73474 [Fbk->NoF]: Fatal error: PDO::__construct(): out of memory

From: Date: Sun, 18 Jul 2021 04:22:19 +0000
Subject: Bug #73474 [Fbk->NoF]: Fatal error: PDO::__construct(): out of memory
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235113@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73474&edit=1 ID: 73474 Updated by: php-bugs@lists.php.net Reported by: hetao at hetao dot name Summary: Fatal error: PDO::__construct(): out of memory -Status: Feedback +Status: No Feedback Type: Bug Package: PDO related Operating System: Ubuntu 14.04 x86_64 PHP Version: PHP Version 5.6.27-1+deb.sury.org~xenial+1 Assigned To: cmb Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2021-07-09 16:56:53] cmb@php.net Is this still an issue with any of the actively supported PHP versions[1]? [1] <https://www.php.net/supported-versions.php> ------------------------------------------------------------------------ [2016-11-11 08:21:55] hetao at hetao dot name I compile the lastest php7,php5 src from the php.net, and the bug not exits. May be the PHP Version 5.6.27-1+deb.sury.org~xenial+1 problem? ------------------------------------------------------------------------ [2016-11-08 16:25:50] adambaratz@php.net Changing package from PDO MySQL to PDO Code, since there are examples for multiple drivers. ------------------------------------------------------------------------ [2016-11-07 14:17:50] cmb@php.net Related To: Bug #73475 ------------------------------------------------------------------------ [2016-11-07 12:08:21] hetao at hetao dot name Description: ------------ When the passowrd is string("") and set ATTR_PERSISTENT is true, the PDO __construct where Fatal Error (You keep press the F5 in the browser , U will see the error some times) If password is not empty or is null , it's ok. $dsn = 'mysql:dbname=test;host=localhost;port=3306'; $user = 'root'; $password = "";//will wrong //$password = null; //will ok try { $dbh = new PDO($dsn, $user, $password, array( \PDO::ATTR_PERSISTENT => true ) ); } catch (PDOException $e) { echo 'Connection failed: ' . $e->getMessage(); } Test script: --------------- <?php /* Connect to an ODBC database using driver invocation */ $dsn = 'mysql:dbname=test;host=localhost;port=3306'; $user = 'root'; $password = ""; $dbh = new PDO($dsn, $user, $password, array( \PDO::ATTR_PERSISTENT => true ) ); print_r($dbh); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73474&edit=1

« previous php.bugs (#235113) next »