Ticket #22603 (closed defect: fixed)
php5-mysql: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND'
| Reported by: | yago.riveiro@… | Owned by: | ryandesign@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.8.1 |
| Keywords: | PHP,PDO | Cc: | |
| Port: | php5-mysql |
Description
Hi,
I have the next error: Fatal error: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND'
I was looking for in php bug tracker the error, and they say that it was solved.
I have installing the port php 5.3.1RC4 devel whit mysqlnd in Snow Leopard
The portion of my code that fails:
$manager = Doctrine_Manager::getInstance();
$conection = $manager-> connection('mysql://'.DB_SERVER_USERNAME.':'.DB_SERVER_PASSWORD.'@'.DB_SERVER.'/'.DB_DATABASE, "base_connection");
$conection->setOption("other", array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8", PDO::ATTR_PERSISTENT => false));
Thanks
Change History
comment:2 Changed 4 years ago by ryandesign@…
- Status changed from new to closed
- Resolution set to fixed
- Port changed from mysqlnd to php5-mysql
- Summary changed from PDO::MYSQL_ATTR_INIT_COMMAND not Available to php5-mysql: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND'
Fixed by updating php5 and php5-mysql to 5.3.1 in r60734.
Note: See
TracTickets for help on using
tickets.

