1
votes

I built a tiny application for a client using cakephp on my local machine running xampp over windows [in a folder "cake" inside htdocs]. Today i created a new folder on my client's live server named "cake" and uploaded the contents of "cake" folder on local machine to "cake" folder on live server for testing. I fired up my app using url: http://kianaretail.com/cake and I got an internal server error 500.

I went through several people suggesting addition of RewriteBase to .htaccess files in root, app and webroot folders pointing to the location. In my case it was "RewriteBase /cake" in root, "RewriteBase /cake/app" in app and "RewriteBase /cake/app/webroot" in webroot. But it did not work still. The problem still persists.

The same application runs fine on my local machine. Just messes up on live server.

Please help.

1
You can check your error logs, or work your way through one step at a time using debug('test'); and exit; - eg. is it making it to the first index.php? Is it making it to the webroot/index.php? Is it loading the Config/bootstrap.php file? ...etc. Once you've narrowed down where it's NOT reaching, that will greatly help in solving the problem.Dave

1 Answers

1
votes

if the application runs fine in the local machine but has problems in the live server, you could also try to investigate which configurations are different between the servers to try to get some hints as to what might be causing the problem.

I would guess that the live server doesn't have mod_rewrite enabled, and so a .htaccess with RewriteBase could be causing the trouble. You can try to comment the .htaccess and see if it runs fine in the server and then re-enable the configurations one at a time to try to figure things out.

Also, as Dave mentioned, checking the error logs would probably give you more information as well.

Hope that helps.