#37419 [Opn]: PDO constructor returns NULL if empty options list is passed under Apache2

From: Date: Fri, 12 May 2006 14:34:28 +0000
Subject: #37419 [Opn]: PDO constructor returns NULL if empty options list is passed under Apache2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-97019@lists.php.net to get a copy of this message
 ID:               37419
 User updated by:  suhachov at gmail dot com
 Reported By:      suhachov at gmail dot com
 Status:           Open
 Bug Type:         Apache2 related
 Operating System: WinXP
 PHP Version:      5.1.4
 New Comment:

I've solved this problem - MySQL extension wasn't loaded properly. But
I think this behavior is strange anyway - why don't to say "cannot
connect to MySQL"?


Previous Comments:
------------------------------------------------------------------------

[2006-05-12 14:20:11] suhachov at gmail dot com

Description:
------------
new PDO('mysql:host=localhost;db=test','test','test',array());
returns NULL under Apache2 and normal object under CLI.

Reproduce code:
---------------
<?
var_dump(
new PDO('mysql:host=localhost;db=test','test','test',array())
);
?>
and run this under Apache2 (my version is 2.0.55)

Expected result:
----------------
to get valid object

Actual result:
--------------
NULL


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37419&edit=1


Thread (4 messages)

« previous php.bugs (#97019) next »