我正在使用ZendServer 6.2.0 php 5.4和apache2
我正在尝试通过以下this教程配置doctrine,当我运行该命令时:./ netndor / bin / doctrine-module orm:validate-schema我收到错误:
第19行的var / www / CommunicationApp / config / autoload / global.php中未定义的类常量'MYSQL_ATTR_INIT_COMMAND'
我已经取消注释/usr/local/zend/etc/php.ini中的extension = php_pdo_mysql.dll
我尝试安装php5-mysql,但它取代了zendserver。
<?php
/**
* Global Configuration Override
*
* You can use this file for overriding configuration values from modules, etc.
* You would place values in here that are agnostic to the environment and not
* sensitive to security.
*
* @NOTE: In practice, this file will typically be INCLUDED in your source
* control, so do not include passwords or other sensitive information in this
* file.
*/
return array(
'db' => array(
'driver' => 'Pdo',
'dsn' => 'mysql:dbname=zf2tutorial;host=localhost',
'driver_options' => array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''
),
),
'service_manager' => array(
'factories' => array(
'Zend\Db\Adapter\Adapter'
=> 'Zend\Db\Adapter\AdapterServiceFactory',
),
),
);