Opened 15 years ago

Closed 15 years ago

#22603 closed defect (fixed)

php5-mysql: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND'

Reported by: yago.riveiro@… Owned by: ryandesign (Ryan Carsten Schmidt)
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 (2)

comment:1 Changed 15 years ago by blb@…

Owner: changed from macports-tickets@… to ryandesign@…

comment:2 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Port: php5-mysql added; mysqlnd removed
Resolution: fixed
Status: newclosed
Summary: PDO::MYSQL_ATTR_INIT_COMMAND not Availablephp5-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.