0

Now I'm working in cakePHP project, It was working in localhost, But when I uploaded to live, It was getting 500 Internal Server error. Could you please advice me what is the problem is this and How to solve this? FYI : My server contains more than 6 cakePHP projects.

Please advice me.

Thanks in Advance.

VinothPHP
  • 821
  • 2
  • 10
  • 22
  • 1
    Check the server/php error log, there's likely an error message in there somewhere. – Halcyon Aug 02 '13 at 11:44
  • And set debug to 2 for a while to debug this. Sounds like you got some experience already. Running five other cake apps you really should be able to tell us more about the issue at hand. – mark Aug 02 '13 at 11:46

2 Answers2

0

A 500 Internal server error is an webserver (Apache) error, not a CakePHP error. Most likely it has to do with the .htaccess file that is needed to get the 'pretty URLs' for Cake working.

JvO
  • 3,036
  • 2
  • 17
  • 32
  • okay, you are right, But all other cakephp projects were working fine in the same pattern, How to determine the .htaccess file. – VinothPHP Aug 02 '13 at 12:08
  • Check for typos, and new/others options that you have used in your .htaccess file. Apache gives a 500 error too if you are using a module or option that is not allowed (check the logs). *Something* must be different.... – JvO Aug 02 '13 at 12:36
0

Trust me, we all had the same problems. Now, I can tell only from my experience:

  1. Check for mod_rewrite on your server.
  2. If you wrote the code with Notepad++ make sure you converted it to "UTF-8 without BOM" with "Encode => Convert to UTF-8 without BOM" in your Notepad++. This was an epic mistake for me because I've spend 3 days on this one.
  3. Make sure you don't have any preceding characters before <?php in your files (try with Vim).
  4. Make sure that the tmp folder is writable chmod -R 775 tmp/ in shell.

If I get any new ideas, I'll edit this answer. Good luck! I know how it feels. ^^

  • Yes, Now I'm working in Notepad++ only and possiblities are there like you said, But I dont think so this is the problem. Coz Now I have uploaded fresh cakephp file into server and I got same error like before, Afterthat I have changed my .htaccess, Now its working fine. I will post my code down... – VinothPHP Aug 02 '13 at 14:34