FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » PDO - Cannot retrieve warnings with emulated prepares disabled
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: PDO - Cannot retrieve warnings with emulated prepares disabled [message #183541 is a reply to message #183524] Wed, 30 October 2013 14:38 Go to previous messageGo to previous message
Thomas Mlynarczyk is currently offline  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)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: splitting list into columns
Next Topic: reading files with accents in the filename from PHP
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Sep 19 22:34:28 GMT 2024

Total time taken to generate the page: 0.04007 seconds