Wednesday, April 15, 2015

Namecheap cpanel php hosting not. working.

So, I recently bought a domain and hosting at namecheap.com, to use for my small php site mentioned in an earlier post. All ready to go, I just hooked up filezilla and uploaded my site I had already made (the second part of the tutorial should come sometime) to public_html/ and hoped for it to work! Unfortunately I got the oh so pretty 500 Internal Server Error.

Internal Server Error  The server encountered an internal error or misconfiguration and was unable to complete your request.  Please contact the server administrator, webmaster@dmdcb.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.  More information about this error may be available in the server error log.  Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
ERROR 500. Btw, who doesn't love the brush in paint?

Man! What's going on? I went straight to searching online, and searched and searched, "setting up php with cpanel", "php namecheap cpanel hosting", adding the "not working" and "500 server error", you get the point.. anyway, tried a bunch of things, with nothing working!
I tried a simple index.html file which worked right off the bat, I of course removed all the fancy stuff and tried a single index.php file with only this line
<?php echo "sup"; ?>
What can go wrong? Well.. that's a silly question! Everything can go wrong. Anyway, after a while I started browsing over the docs at namecheap because at this point I didn't want to bother a live representative for something so silly! Found nothing, so I gave up and talked to a (presumably) person.

After phrasing my question (short but sweet due to character maximums), the first things out of the representative's mouth are:

You have to change the permission of the file to 644.

Bam! I'm like, what now? Windows whuut. Anyway, so after some fiddling, turns out you can do that straight from filezilla by right-clicking your .php files (on the domain side) and going to
file permissions...
and then changing it to 644.

After this it worked for me!


Big thanks to the tech guy at namecheap! (his name was r-something. Riley? maybe)

click file permissions...
step 1

change file permissions to 644
step 2

No comments:

Post a Comment