Internal Server Error - PHP - cPanel - php

I have a PHP site hosted with cPanel.
Yesterday, I changed certain directory listings (using Index Manager). I initially changed the settings from "Default System Setting" to "No Indexing" on all the directories and afterwards I have started getting following 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#***.*** 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 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
I have then reverted all the settings back to their original but still getting the same error.
Following error is shown in Error Log -
[Tue Dec 04 01:20:54 2012] [alert] [client 119.226.234.18] /home/***/public_html/.htaccess: ErrorDocument takes two arguments, ErrorDocument Apache configuration directive
I don't understand how to resolve this!! Please help!!

It's an error in your htaccess.
Open .htaccess in a texteditor. The line with ErrorDocument should look like this:
ErrorDocument 404 /404.html

I was also facing same issue.
By changing the folder permission that I was trying to access to 755 in file manager resolved the issue.

Try to check this error log:
/usr/local/apache/logs/error_log

Related

Turning Off the apache status error

When I browse my site and the code reports a 500 error code, the browser shows me the message:
Unauthorized
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, [no address given] 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 500 Internal Server Error error was encountered while
trying to use an ErrorDocument to handle the request.
I have to turn off this, becouse I send data extra in the body response.
Where is it in apache?
Thanks
To change the default error messages in Apache, use the ErrorDocument directive. For example:
ErrorDocument 500 /internal/address.php
ErrorDocument 500 http://external.address/
ErrorDocument 500 "Custom error message"
This should work in an .htaccess file as well.

Internal Server Error while run my website

I have uploaded my website on cpanel. When I open it I see
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator at webmaster#testme.com to
inform them of the time this error occurred, and the actions you
performed just before this 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.
What can I do for this?
You need to create a 404 page first of all -> that is the final part of your error.
The misconfiguration '500 inernal server error' is nearly always caused by an incorrect .htaccess file - check that you have the correct RewriteBase defined.
Try to see the server log error. The details where the error occurred are stored and there are a wide variety of reasons for internal server error. Apache2 server logs can be seen at:
/var/log/apache2/error.log
You can also see the access.log at /var/log/apache2/access.log
Besides, you can see the cPanel error logs
I also faced a similar internal server error on my drupal 6 website and error log showed me that I called an undefined json function(not installed on server then).

Error handling, 500 internal server error

This is the response page that i get frmo my ajax request.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin#example.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 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Do anyone have any idead why theres no error page? I do have the error controller and view to handle it, but it's no use, it don't work :/
Have a look for ErrorDocument 500 in your Apache httpd.conf file. In there you'll see if your setup has an override for the default 500 error code - e.g. ErrorDocument 500 /http_codes/http_code_500.html
It's server's error page. It's generated by misconfiguration (like a typo in .htaccess), much earlier than ZF's index.php is requested. You can't fix this using ZF - you need to fix your server.

session didn't started

I've found an amazing problem. I today released a website which is based on MLM business. The whole day I test the website, but no errors found. But at night when I tried to login a member page I'm getting the below error:
[21-Sep-2011 13:30:36] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: open(/tmp/sess_44507540b8d51d06160a2856360692e6, O_RDWR) failed: Permission denied (13) in /home/dashingb/public_html/sts/conf.php on line 3
I'm on shared host with apache server. I've no root access. How to solve the problem ? also above is showing WARNING, But when I try to open the login page it shows 500 error (http://dashingbird.com/sts/admin/)
my session starting method is as below:
<?php
if(! isset($_SESSION)){
session_start();
}
?>
Plus below error is getting:
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, webmaster#dashingbird.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. Apache/2.0.63 (Unix)
mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1
mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at dashingbird.com Port
80
When I turned error_reporting(E_ALL), I just got the above warning (session warning).
please help me..
Most likely PHP can't write out the session file to whatever directory is specified for the session save path. You can find out what that path is with session_save_path().
If you can't modify the permissions on that directory to allow writes by the webserver, you'll have to change the PHP configuration to point at a directory where it CAN read/write files. Or manually override it in each script with a session_save_path('/path/to/writeable/dir') before you call session_start().
It seems there is something wrong on the server. Generally on a shared host there is not musc you can do yourself. I would suggest emailing (or opening a ticket) your hosting support.
Its most likely some sort of permission issue.
Also the 500 error means something is wrong with server config, Mostly it is caused by some error in .htaccess file.

getting error as Internal Server error

When I try to run my site it gives error as Internal Server error, when I refresh the page I get my result properly.The error page looks like this:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster#test.mywebsite.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.
I also checked error_log file on my server, it gives error as:
[Sat Jun 12 01:21:55 2010] [error] [client 117.195.6.76] File does not exist: /home/rohit25/public_html/test/500.shtml, referer: http://www.test.mysite.com/home.php
sometimes error can be;
[Sat May 29 19:35:12 2010] [error] [client 97.85.189.208] File does not exist: /home2/carlton/public_html/test/favicon.ico
Are there any changes required in configuration file, I also tried to involve this error code in custom error page, it shows error page, which could not resolve this issue.
Your urgent help will be greatly appreciated.
The two errors you posted from your log are 404 errors. You need to configure your server to report HTTP 500 errors, which are those Internal Server Errors causing the message above.

Categories