This weekend I started doing some web work for a client who wanted to be able to add and remove some content to their site with out having to know any html. Easy!
I wanted to take this as an opportunity to try out a few different web frameworks to see which I like the most and which I wanted to learn more. The first two I looked at were django and CodeIgniter.
After running through the tutorial for django, I was totally sold! Everything about it seemed amazing and worked like a charm! But when I tried to load it up on my 1&1 account, it was a no go situation. django is a Python package that has to be installed by a privileged user. There are other hosts out there at comparable prices that have django pre-installed, but they do not offer the amount of space that 1&1 does (which I use to back up my personal files). Also, a lot of the work that I do is adding functionality to already existing sites, where I have no input into where the site is hosted, and so again, it doesn’t look like django will work for me.
Next up was CodeIgniter, and while its not quite as impressive as django (I actually had to create a database table myself… *sarcastic sigh*), it seems like it will do the job.
Next up, time to work on this site. One problem. I don’t have any cPannel type login information or know any credentials for a database I can use… No worries though: sqlite to the rescue!
I setup CodeIgniter to work and all is looking great. I created some sample data with the command line sqlite interface and Select statements are working perfectly. I’m not pretty far into this project, too far to back out now. The client side of things are all done, and I’m now working on the admin interface. Time to setup some DELETE and INSERT queries.
“Unable to open database…”. WHAT? What do you mean unable to open database? If i changed any of these queries to a SELECT, they work fine, so its obviously able to open it. I chmod the file to 777, still nothing.
After what felt like, and probably was, hours of searching, I finally came across this article at mediakey.dk.
As it turns out, to be able to write to a sqlite file, the folder that it resides in must also be writable. So simple, but so frusterating. I’m going to post this hint in as many spots as I can find now, so hopefully other user’s won’t have to go through as much trouble finding it as I did.