-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Pdo\Mysql object is uninitialized" when opening a persistent connection #16314
Comments
This problem is not limited to MySQL. I can also reproduce it with a Postgres database: $pdo = PDO::connect('pgsql:host=127.0.0.1;dbname=test', 'postgres', 'postgres', [PDO::ATTR_PERSISTENT => true]);
$pdo->query('SELECT 1;'); Output:
Again, if I set |
cc @Danack and @kocsismate since the new PDO classes are essentially your baby. Thank you very much for your work on that, by the way. ❤️ |
@derrabus Thank you for the report (and the compliment as well)! I'll start to look into the problem tonight. |
…rsistent connection
…rsistent connection
…rsistent connection
…rsistent connection
…rsistent connection
@derrabus Finally, I merged my changes so that it makes RC4. Thanks for your patience! |
I'm reverting our workaround in doctrine/dbal#6623. Thank you very much for fixing the bug. 🙏🏻 |
Description
The following code:
Resulted in this output:
But I expected this output instead: No error.
The error is gone if I either set
PDO::ATTR_PERSISTENT
tofalse
or call the oldschool constructor (new PDO(…)
).PHP Version
PHP 8.4-dev
Operating System
MacOS 15.0.1
The text was updated successfully, but these errors were encountered: