{"id":7249,"date":"2014-06-03T22:50:33","date_gmt":"2014-06-03T22:50:33","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/06\/03\/mysqlnd_ms-config-file-fails-with-unexpected-collection-of-common-programming-errors\/"},"modified":"2014-06-03T22:50:33","modified_gmt":"2014-06-03T22:50:33","slug":"mysqlnd_ms-config-file-fails-with-unexpected-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/06\/03\/mysqlnd_ms-config-file-fails-with-unexpected-collection-of-common-programming-errors\/","title":{"rendered":"mysqlnd_ms Config File Fails with &ldquo;unexpected &#39;{&#39; &rdquo;-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m trying to get the mysqlnd_ms (master_slave) plugin to run, but receive the error that the config file contains and unexpected bracket. To make sure I didn&#8217;t corrupt anything, I replicated this error on a fresh install. Both installs are Ubuntu 12.04-LTS using the packaged PHP-5.3.10 and are running through Apache&#8217;s module. Because the php5-dev package does not contain the headers for mysqlnd, I had to jump through some hoops to get PECL to install the package.<\/p>\n<p>I am following the guide from MySQL&#8217;s website 20.7.6.4. Quickstart and Examples<\/p>\n<p>Here is the error I am seeing:<\/p>\n<pre><code>root@mysqlndms:~# php -v\nPHP:  syntax error, unexpected '{' in \/etc\/php5\/cli\/conf.d\/mysqlnd_ms_plugin.ini on line 1\nPHP 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli) (built: Mar 11 2013 14:34:31)\nCopyright (c) 1997-2012 The PHP Group\nZend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies\nroot@mysqlndms:~#\n<\/code><\/pre>\n<p>And this is the contents of the .ini file:<\/p>\n<pre><code>root@mysqlndms:~# cat \/etc\/php5\/cli\/conf.d\/mysqlnd_ms_plugin.ini\n{\n    \"myapp\": {\n        \"master\": {\n            \"master_0\": {\n                \"host\": \"localhost\"\n            }\n        },\n        \"slave\": [\n\n        ]\n    }\n}\nroot@mysqlndms:~#\n<\/code><\/pre>\n<p>This .ini file is copied straight from MySQL&#8217;s tutorial.<\/p>\n<p>For completeness, here are the hoops I had to jump through to get the PECL package to build:<\/p>\n<pre><code>cd \/usr\/local\/src\/\napt-get source php5\ncd php5-5.3.10\/ext\/\ncp -a mysqlnd\/ \/usr\/include\/php5\/ext\/\ncd \/usr\/local\/src\/php5-5.3.10\/ext\/mysqlnd\/\nmv config9.m4 config.m4\nsed -ie \"s{ext\/mysqlnd\/php_mysqlnd_config.h{config.h{\" mysqlnd_portability.h\nphpize\ncp -a mysqlnd_portability.h \/usr\/include\/php5\/ext\/mysqlnd\/\npecl install mysqlnd_ms\n<\/code><\/pre>\n<p>I am really at a loss as where to go from here and would love a gentle push in the right direction. I&#8217;m not afraid to compile from source, but would really like to use the packages if at all possible.<\/p>\n<p>Thanks!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying to get the mysqlnd_ms (master_slave) plugin to run, but receive the error that the config file contains and unexpected bracket. To make sure I didn&#8217;t corrupt anything, I replicated this error on a fresh install. Both installs are Ubuntu 12.04-LTS using the packaged PHP-5.3.10 and are running through Apache&#8217;s module. Because the php5-dev [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7249","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7249"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7249\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}