#47224 [Opn->Asn]: MYSQL_ATTR_INIT_COMMAND is no longer available

From: Date: Tue, 27 Jan 2009 12:35:04 +0000
Subject: #47224 [Opn->Asn]: MYSQL_ATTR_INIT_COMMAND is no longer available
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-133243@lists.php.net to get a copy of this message
 ID:               47224
 Updated by:       johannes@php.net
 Reported By:      contact at joycebabu dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         PDO related
 Operating System: Windows
 PHP Version:      5.3.0alpha3
-Assigned To:      
+Assigned To:      mysql


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

[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



Thread (11 messages)

« previous php.bugs (#133243) next »