How to solve cakephp 500 Internal Server Error? - cakephp

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.

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.

Related

How do I configure Bolt CMS on an subdomain correctly?

I currently have a working Bolt installation on my main domain (i.e. example.com). But I also wanted a subdomain (i.e. blog.example.com).
I created it, but when I uploaded Bolt to it, but when I tried to access it I only got 404 errors.
I tried copying the Bolt installation from the main domain, then only the main page works, but when I try to access the CMS I get a 404 error. Also if I try to access other pages (i.e. blog.example.com/images) I get a 404.
I tried to change the RewriteBase in the .htaccess to all possible things, but no result.
Also if I do it on another hosting company it is just working, does anyone have a suggestion?
Thanks in advance!
if it is working at another hosting company, maybe that is something non-bolt related issue.
I assume that both of them Apache, so after checking file access rights then I would check apache log.
I had the exact same issue and found out that mod_rewrite was disabled on my sub domain.

IIS 6 weird behavior with Local Path over Windows 2003 Server

I have a site who needs to be pointed to: inetpub\wwwroot\cakephp\app\webroot\
If I point the "Default Web Site" to that directoy, my web application works perfectly.
Now, as I want to add more sites to that same computer, I am pointing the "Default Web Site" to inetpub\wwwroot\ and the concrete folder for my web application (cakephp) to the previous path inetpub\wwwroot\cakephp\app\webroot\.
When I do this I have noticed it doesn't even execute the index.php file located inside inetpub\wwwroot\cakephp\app\webroot\ contrary as it should. It only does it when accessing directly to the root of the site.
To clarify it:
www.myweb.com/cakephp/ executes inetpub\wwwroot\cakephp\app\webroot\index.php
www.myweb.com/cakephp/actionName/ does NOT executes inetpub\wwwroot\cakephp\app\webroot\index.php
Why is this happening? Why it doesn't recognize the given path when I add any parameter to the URL?
It tries to list the folder content instead...
Thanks.
Have you tried this:
http://www.myweb.com/cakephp/index.php/Controllername/
For example:
http://www.myweb.com/cakephp/index.php/pages/home/
if that is working, then 'URL rewriting' isn't working.
URL Rewriting doesn't work out-of-the-box on IIS, but can be configured with the instructions in the documentation:
http://book.cakephp.org/2.0/en/installation/advanced-installation.html#url-rewrites-on-iis7-windows-hosts
However, your setup may need to be slightly different than the documentation because you've installed your website in a subdirectory

Changing the host of my CakePHP site

I bought an application made in ​​Cakephp, everything was fine before, but once I wanted to host it on another server (with keeping the same database and folders), I find the links to the CSS, JavaScript and images do not work.
Please I have no knowledge in CakePHP.
Did you clean up the database?
I had to change some entries by hand once, because the servername/ip/url didn't change.
go to your db management system and search for your old IP/Path/domainname etc....
Did you copy over the (often hidden) .htaccess files when you moved to the new host?
There are three .htaccess files, one in the root of your site, on in the /app directory, and one in /app/webroot
Is mod_rewrite enabled on your new server?

404 returned from a file that exists in ASP.Net on IIS 5

I'm running into this problem and its driving me crazy.
Also, we are not allowed to update the version of IIS.
The content on the server (asmx files holding WCF webmethods called via SOAP) exists and I can freely browse in inetmgr to the virtual directory that contains this data. The files all exist all on the file system and the virtual directories all point to the correct spot and have the correct ACLS, but when I go to their URLs all I get is a 404 message.
I have reset IIS, I have rebooted the server, and I have done everything I can think of.
The IIS logs simple return "404 - -" as the entire line contents, with no other data in the line.
The event logs show nothing, and ASPNET is not dying or anything like that.
With no event logs, and minimal logs in IIS , I have no idea what to do and was hoping that others had run into this before.
In IIS logs there should some codes along side the 404 error which will help find the issue.
Check IIS has the correct version of .Net installed using aspnet_regiis command line tool. Also check that ASMX extensions are mapped to the .Net ISAPI filter as they are with ASPX pages.

Deploying CakePHP on sub domain redirects to wrong location

I am trying to deploy my locahost CakePHP website to a subdomain. I am able to view the website but it is not working correctly when I try to login or register.
It does not show me any validation error nor does it allow me to login or register and it is landing on the below URL:
subdomain.example.com/webroot/index.php?url=users/login
where it should be something like:
subdomain.example.com/users/login
I am using Go Daddy shared hosting.
The older settings defined at http://bakery.cakephp.org/articles/cguyer/2009/10/18/mod-rewrite-on-godaddy-shared-hosting has solved the issue.
Thank you every one for your help.
This sounds (and looks) like an Apache rewrite issue. There are a couple of things you need to look at:
Check to make sure the .htaccess files are were they are expected. You should have one in the app directory and another in the webroot directory. Sometimes when we compress and/or transfer files to the webserver, the .htaccess files get left behind.
Make sure that the server you are running the site on has rewrite turned on. This may require that you call support at Go Daddy. But my experience is they are always willing to help.
Good luck!

Resources