Re: PDO - Cannot retrieve warnings with emulated prepares disabled [message #183541 is a reply to message #183524] |
Wed, 30 October 2013 14:38 |
Thomas Mlynarczyk
Messages: 131 Registered: September 2010
Karma:
|
Senior Member |
|
|
Thomas 'PointedEars' Lahn schrieb:
> You have a different order of fetching the result and fetching the warnings.
> Please try my test cases.
I just did so, but the result remains unchanged: No warning with
PDO::ATTR_EMULATE_PREPARES = false.
> The more important question is: Why would it matter *at* *all* in PHP 5.4.x
> where by PDO_MySQL that attribute *is* *not* *supported* and *emulation*
> *is* *not* *done* when using a MySQL 4.1+ client?
I had assumed emulation was the default for PDO, whether necessary or
not and you had to disable it explicitly. But if that's not the case,
the whole thing becomes even more confusing.
> Something is utterly wrong with your local setup,
I'm inclined to agree with you. My setup is a XAMPP distribution (a few
years old, yes). I had modified the Apache configuration so I could have
several different versions of PHP running as FastCGI and configure the
PHP version to use via .htaccess per project folder. Still, I don't see
how this could have messed things up in the way observed.
> and I assume it is at
> least the MySQL version mismatch. First be clear which version of PHP,
> MySQL client, and MySQL server you are using, *exactly*, and that you are
> using the correct versions.
PHP 5.4.21, CGI/FastCGI (previously 5.4.8, same result)
MySQL server: 5.1.41
MySQL client: mysqlnd 5.0.10 - 20111026 -
$Id: e707c415db32080b3752b232487a435ee0372157 $
The server is the one that came with my XAMPP installation and the PHP
distribution was downloaded yesterday.
The cleanest solution is probably a complete fresh installation, but I
can't afford any "downtime" of my dev environment at the moment.
> That said, why are you preparing invalid statements in the first place?
And how would /you/ test if warnings "work"?
Greetings,
Thomas
--
Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
(Coluche)
|
|
|