ID: 42371
Comment by: mpub at meiners-online dot de
Reported By: songqi at baidu dot com
Status: Assigned
Bug Type: PDO related
Operating System: Redhat linux
PHP Version: 5.2.3
Assigned To: andrey
New Comment:
If the different client- and server-versions are simply not meant to be
compatible and it isn't a bug, it seems useful to me to raise an
E_WARNING or E_NOTICE. This could help a lot of people by warning them.
Previous Comments:
------------------------------------------------------------------------
[2007-10-05 14:54:24] mpub at meiners-online dot de
I also use PHP 5 and MySQL 4 and had the same problem. When I use
PHPMyAdmin it says "Your PHP MySQL library version 5.0.18 differs from
your MySQL server version 4.0.27. This may cause unpredictable
behavior." This confirms the existence of the problem. It seems to be a
well-known problem. Otherwise it could be useful to contact the
developers of PHPMyAdmin to find out more about their experiences.
------------------------------------------------------------------------
[2007-08-24 10:32:22] [EMAIL PROTECTED]
Andrey, any ideas about this? Seems more like an issue outside PHP..
------------------------------------------------------------------------
[2007-08-22 08:45:13] songqi at baidu dot com
Description:
------------
PDO doesn`t throw Exception when querying a sql with syntax error as
expected.
MySQL Client Version: 5.0.45
MySQL Server Version: 4.0.16
But if I connect to a MySQL5 server, it throws Exception correctly.
Same error happened in php-5.2.2
Reproduce code:
---------------
$dbt = new PDO("mysql:host=xxx;port=xxx;dbname=xxx",'xxx','xxx');
$dbt->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$a = $dbt->query("what happened?");
Expected result:
----------------
PDO should throw a Exception
Actual result:
--------------
nothing is throwed
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42371&edit=1