Skip to main content


Showing posts from January, 2014

PDO SQlite error: unable to open database file

When you're testing your PHP applications with SQLite you might bump into a problem when using PDOthat states "SQLSTATE[HY000]: General error: 14 unable to open database file". When using Zend Framework 2, you might only get the InvalidQueryException"Statement could not be executed", for which I've made a pull request on Github to make it more clear what's going on. The problem is about permissions. For SQLite it's not enough to make the database file writeable for the web server user, but also the directory this file is in. I found the solution on StackOverflow, thanks to Austin Hyde for giving the answer that pointed me in the final path to the solution. In order to fix this issue I changed the group of the directory and db file to "www-data", the group my web server (Apache) was running on, and made them writeable for the group. $ cd /path/to/application $ chgrp www-data data/db $ chgrp www-data data/db/application-test.db $ chmod g+w d…

Have a wonderful 2014!

Welcome 2014! A new year means again a new opportunity to stand out and make a difference. Each year people make a bunch of new year's resolutions that are hard to maintain. I want to ask my readers to do something for the community: update documentation, fix bugs on your favourite project or attend a PHP user group event or conference.
If you need some inspiration, these are upcoming PHP conferences you don't want to miss:

More conferences will be announced, but this will get you started.