#47224 [Asn]: MYSQL_ATTR_INIT_COMMAND is no longer available

From: Date: Sat, 25 Apr 2009 15:35:53 +0000
Subject: #47224 [Asn]: MYSQL_ATTR_INIT_COMMAND is no longer available
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-136299@lists.php.net to get a copy of this message
 ID:               47224
 Updated by:       jani@php.net
 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:

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

mysqlnd driver is used.


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 (#136299) next »