ID:               47224
 Comment by:       christian dot gahlert at web dot de
 Reported By:      contact at joycebabu dot com
 Status:           Assigned
 Bug Type:         PDO related
 Operating System: Windows
 PHP Version:      5.3.0alpha3
 Assigned To:      mysql
 New Comment:

Hi,

I just had the same problem. It occured because I installed the PDO
extension via pecl but forgot to also install PDO_MYSQL.

After I installed the PDO_MYSQL everything was fine.

I hope I could save someone some time :)
Chris


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

[2009-04-25 15:35:53] j...@php.net

For some reason this (and some other) constants are only available when

mysqlnd driver is used.

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

[2009-01-27 12:33:45] contact at joycebabu dot com

Description:
------------
The constant PDO::MYSQL_ATTR_INIT_COMMAND is not available.

Reproduce code:
---------------
try {
    $pdbo = new PDO("mysql:host=localhost;dbname=test", 'root', '',
array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
}catch(PDOException $e){
    echo $e->getMessage();
}


Expected result:
----------------
A successful connection to the mysql database

Actual result:
--------------
Fatal error: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' in
D:\Projects\Apache\htdocs\mysite.com\httpdocs\include\define-vars.inc.php
on line 23


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


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

Reply via email to