{"id":11,"date":"2013-03-26T16:41:03","date_gmt":"2013-03-26T16:41:03","guid":{"rendered":"http:\/\/brew.outofadjectives.org\/?p=11"},"modified":"2013-03-26T16:41:03","modified_gmt":"2013-03-26T16:41:03","slug":"pdo-and-only-pdo","status":"publish","type":"post","link":"http:\/\/brew.outofadjectives.org\/?p=11","title":{"rendered":"PDO and only PDO"},"content":{"rendered":"<p>Life on EC2 can be a bit cramped (or alternately, expensive) in the way of memory. I wanted to slim down my memory footprint for PHP by disabling extra extensions. The biggest culprit in terms of redundancy was MySQL with mysql, mysqli, and pdo_mysql. Using just the mysql extension would be the easy route, but not the future-proofing route. I picked pdo_mysql for a slight edge in flexibility &#8211; even if SQL-agnostic applications are a fantasy.<\/p>\n<p>First up for compatibility checking was <a href=\"http:\/\/roundcube.net\/\">roundcube<\/a>. The version available via apt can only use the mysql extension, but that&#8217;s a fairly old version and development on the project is still active. Roundcube has moved over to <a href=\"https:\/\/github.com\/roundcube\/roundcubemail\">github<\/a> from SVN which is a nice change. The development version is built entirely around PDO and works quite nicely so far. Upgrading was as simple as copying a few configuration directives from the old version to the new one.<\/p>\n<p>Next was <a href=\"http:\/\/wordpress.org\/\">WordPress<\/a>. The base version still requires mysql and it looks like that will be the case for quite awhile due to compatibility and availability concerns. But some WordPress developers have contributed a set of <a href=\"http:\/\/core.trac.wordpress.org\/ticket\/21663\">preliminary patches<\/a> to allow mysqli and pdo_mysql usage. After a little tinkering, I applied those patches to the latest development release and the blog now runs on PDO too (knock on wood). I made <a href=\"https:\/\/github.com\/gohanman\/WordPress\/tree\/pdo-testing\">my own fork<\/a> on github with a PDO branch since tracking the upstream version is going to be a bit more complicated with local changes to maintain.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Life on EC2 can be a bit cramped (or alternately, expensive) in the way of memory. I wanted to slim down my memory footprint for PHP by disabling extra extensions. The biggest culprit in terms of redundancy was MySQL with &hellip;<\/p>\n<p class=\"read-more\"><a href=\"http:\/\/brew.outofadjectives.org\/?p=11\">Continue reading &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/brew.outofadjectives.org\/index.php?rest_route=\/wp\/v2\/posts\/11"}],"collection":[{"href":"http:\/\/brew.outofadjectives.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/brew.outofadjectives.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/brew.outofadjectives.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/brew.outofadjectives.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11"}],"version-history":[{"count":0,"href":"http:\/\/brew.outofadjectives.org\/index.php?rest_route=\/wp\/v2\/posts\/11\/revisions"}],"wp:attachment":[{"href":"http:\/\/brew.outofadjectives.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/brew.outofadjectives.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/brew.outofadjectives.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}