500 Internal Server error with codeigniter mysql connection
I was trying out CodeIgniter today. I found it quite lightweight and easy to get started with. MVC was fine until I came across a strange issue. Every time I tried to connect to the database, I would end up getting the infamous "500 Internal server error". Unfortunately, even after checking through all http logs, I was not able to trace it to anything that could've gone wrong. I had apache, php, mysql installed and configured correctly. Spent about 4 hours trying out different configurations, playing around with the database names, model names, etc, just to realise later that I did not have the php-mysql driver installed! This time I was on an ubuntu machine, so I had to: apt-get install php5-mysql and then although I could see that apt-get had already restarted apache2 for me, I just thought of doing it myself as well, service apache2 restart and there it was. Everything was working the way I wanted it to be. It was a very silly thing to miss out on this one. I have don...