0

I am getting this error

Parse error: syntax error, unexpected T_DOUBLE_ARROW, expecting '(' in C:\wamp\www\common.php on line 15

and the line 15 is

$options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'); 

but when i run in wamp then it's run fine without any error. so...

Jaiff
  • 497
  • 2
  • 5
  • 17
  • possible duplicate of [Zend Framework: Undefined class constant 'MYSQL\_ATTR\_INIT\_COMMAND'](http://stackoverflow.com/questions/2510267/zend-framework-undefined-class-constant-mysql-attr-init-command) – Giacomo1968 Jun 05 '14 at 20:47

1 Answers1

1

The PDO::MYSQL_ATTR_INIT_COMMAND constant is only available when the mysqlnd driver is used. I guess Nysphere doesn't have that driver enabled.

See https://bugs.php.net/bug.php?id=47224

Also search SO for other questions related to MYSQL_ATTR_INIT_COMMAND

Barmar
  • 741,623
  • 53
  • 500
  • 612