Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

500 error with CodeIgniter

I have just moved my CodeIgniter project to a new server and now I'm getting a 500 error and no output from the project. It works fine on my old server and in my test environment. I'm completely stumped how to troubleshoot this, especially as there's nothing of use in the log files. Any help would be great!

like image 250
pauloconnor Avatar asked Dec 03 '22 12:12

pauloconnor


2 Answers

Well, this is embarrassing. I was missing php-mysql. CodeIgniter wasn't logging the fact that it couldn't find it, nothing was appearing in /var/log/messages. Installed it and suddenly, it works. Thanks all for your answers.

like image 75
pauloconnor Avatar answered Dec 18 '22 00:12

pauloconnor


I get this problem on my live server with SuPHP. To avoid it, all PHP files must have permissions 0644, and directories 0755.

To do this without a headache, do one of the following:

  • Get an FTP client that will upload using permissions you specify
  • Find a PHP script that will change permissions, based on filtering criteria, after upload
  • Get shell access to your host!
like image 44
Kurucu Avatar answered Dec 18 '22 00:12

Kurucu