PDO::MySQL options - PDO::MYSQL_ATTR_INIT_COMMAND

140 views
Skip to first unread message

Michael Dykman

unread,
Apr 14, 2014, 12:44:45 PM4/14/14
to caucho-...@googlegroups.com
While trying to get a code base ported from Zend PHP to Quercus, I came across the following error:

PDO::MYSQL_ATTR_INIT_COMMAND is an unknown constant

The point of this particular option is to provide a command (as a string) which is guaranteed to be fired on any newly created connection before it is handed off to the application. In our case, we are using it to enforce UTF8 encoding on a per-client basis via the command "USE NAMES UTF8".

Currently, I am trying to keep the application's database code intact, avoiding quercus-specific changes changes for the most part. I can think of one or two ways to work around this shortcoming but if I may inquire: what is the general recommendation in this case?

Nam Nguyen

unread,
Apr 14, 2014, 10:27:55 PM4/14/14
to caucho-...@googlegroups.com
Hi Michael,

I just committed a fix for this.

http://bugs.caucho.com/view.php?id=5714

-- Nam
> --
> You received this message because you are subscribed to the Google
> Groups "Quercus" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to caucho-quercu...@googlegroups.com
> <mailto:caucho-quercu...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Michael Dykman

unread,
Apr 15, 2014, 11:20:36 AM4/15/14
to caucho-...@googlegroups.com, n...@caucho.com
Hi Nam,

Thank you again, sir.

 - michael

ccou...@gmail.com

unread,
Apr 30, 2015, 5:45:49 AM4/30/15
to caucho-...@googlegroups.com, n...@caucho.com
As I need the same thing, how can I rebuild the quercus.jar or get an update for it? Last download is still dated 2014/04/07 without this fix?

Is there any other way to set UTF8 on a PDO?

Thanks.
Reply all
Reply to author
Forward
0 new messages