500 Internal Server Errors

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Books

500 Internal Server Errors

Post by Books »

The server is running:
Linux kernel version  2.6.18-1-s5
Apache version 1.3.37 (Unix)
PHP version PHP/4.4.4
MySQL version 4.1.21-standard-log

I uploaded the CMSMS files, chmod'ed some of the files and created the config.php file. When I checked the www.mysite.com it showed the CMSMS installation screen but it said that the tmp/ files weren't ready. It was then that I found out that my FTP connection had failed in the middle of the upload and only half the files had transferred.

I uploaded the rest of them and continued, but got a 500 Internal Server Error. I deleted them and re-uploaded. Still 500. I went to my host and erased the entire site and started over from scratch, and the directory appeared as normal. I uploaded the files and followed the directions. Still 500. I tried using CHMOD 775 instead of 777. Still 500.

I've tried everything and I'm at a loss. Does anyone have any ideas?

Thanks!

Books
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: 500 Internal Server Errors

Post by tsw »

anything in server logs?
Books

Re: 500 Internal Server Errors

Post by Books »

tsw wrote: anything in server logs?
Not much. All it says is this, repeated over and over each time I've tried it.

Premature end of script headers: /home/kendalkd/public_html/install/install.php
File does not exist: /home/kendalkd/public_html/500.shtml
File does not exist: /home/kendalkd/public_html/404.shtml
File does not exist: /home/kendalkd/public_html/favicon.ico

Does this help?

Books
Last edited by Books on Tue Nov 28, 2006 9:34 pm, edited 1 time in total.
Books

Re: 500 Internal Server Errors

Post by Books »

I have a second domain at the same host, so I uploaded the CMSMS files to a subdirectory of the second one. I'm getting the same 500 Error. Is it a problem with the host?

Books
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: 500 Internal Server Errors

Post by tsw »

Premature end of script headers: /home/kendalkd/public_html/install/install.php

that is the error, it should say something more tho..

check that the file is intact (some ftp clients have a bad habbit of braking files)
Books

Re: 500 Internal Server Errors

Post by Books »

tsw wrote: Premature end of script headers: /home/kendalkd/public_html/install/install.php

that is the error, it should say something more tho..

check that the file is intact (some ftp clients have a bad habbit of braking files)
I checked it and it's ok. I also uploaded the files to a completely separate domain, with the same 500 Errors.
Books

Re: 500 Internal Server Errors

Post by Books »

Ok, I emailed my hosts tech support and this is their response:

It looks as though your application may have been permissioned for PHP installed as an apache module rather than a CGI. I have initiated an automated process that will run for the next 24 hours on your machine and will automatically adjust the permissions of files that produce an error as a result of this issue. If you notice the error again, simply hold off for about 20 seconds then try again. You should find the issue resolved at that point in time. Thank you.

Can anyone translate this?  :o  ;)

Books
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: 500 Internal Server Errors

Post by Ted »

Basically, the error was due to the fact that the web server didn't have permission to run your php files.  There are two different permissions schemes that are in use, depending on how the web server is configured to run php.  Apparently it was setup wrong, so they have a script that will run through the server and fix the permissions so that php files will run correctly.

I hope that makes a little more sense.  :)
Books

Re: 500 Internal Server Errors

Post by Books »

Ted wrote: Basically, the error was due to the fact that the web server didn't have permission to run your php files.  There are two different permissions schemes that are in use, depending on how the web server is configured to run php.  Apparently it was setup wrong, so they have a script that will run through the server and fix the permissions so that php files will run correctly.

I hope that makes a little more sense.  :)
Yes, that helps! Thank you!

Books
Books

Re: 500 Internal Server Errors

Post by Books »

It's broken again. Their fix only lasted one day, now the server won't recognize any .php files. Their response had said, "It looks as though your application may have been permissioned for PHP installed as an apache module rather than a CGI. I have initiated an automated process that will run for the next 24 hours on your machine and will automatically adjust the permissions of files that produce an error as a result of this issue. If you notice the error again, simply hold off for about 20 seconds then try again."

Can CMSMS be set to recognize PHP installed as a CGI?

Is this something they are going to be able to fix, or should I look for a new host?

Thank you for your help!!!

Books
Books

Re: 500 Internal Server Errors

Post by Books »

mark wrote: I'd go with another host if it's not too late...

My clients and I all run on 1and1 and have had no problems, I even install modules thru the Module Manager or .xml and then .zip the folders/files for others to use who can't get the permissions to let them or whatever the problems are, without changing the (unmask) from default...

They give 40m of memory to run php...
In their new response the tech guy criticizes CMSMS.

He writes, "I have initiated the script once again for you and it will run for the next 24 hours. The problem itself is not that of the servers but the script vendor has provided you this application with insecure and incorrect permissions settings or guidelines which is causing this error. Our system is set up using PHP installed as a CGI with phpSuExec in place which provides added security for users over a default module install of PHP. Your application vendor should be able to provide you with instructions needed to resolve this yourself, otherwise we are willing to run the script to fix this as needed upon your request. Thanks."

What should I think of this?

Books
Books

Re: 500 Internal Server Errors

Post by Books »

I moved to a new host and uploaded the files, and now I'm getting the same 500 Internal Server Error! What am I doing wrong?

The error log says the errors are:

[Sat Dec  2 22:57:55 2006] [error] [client XX.XXX.XX.XX] File does not exist: /home/username/public_html/sitename/500.shtml
[Sat Dec  2 22:57:55 2006] [error] [client XX.XXX.XX.XX] Premature end of script headers: /home/username/public_html/sitename/cms/install/install.php

I searched the forums and found a thread with three people with the same problem, http://forum.cmsmadesimple.org/index.ph ... 855.0.html, with no solutions given.

Can anyone help???

Thank you!

Books
Books

Re: 500 Internal Server Errors

Post by Books »

I just Googled for "Premature end of script headers" and found this on the Apache site. I'm not a programmer so I don't have a clue about what it is saying. Can someone translate?

http://httpd.apache.org/docs/1.3/misc/F ... pt-headers
What does it mean when my CGIs fail with "Premature end of script headers"?

It means just what it says: the server was expecting a complete set of HTTP headers (one or more followed by a blank line), and didn't get them.

The most common cause of this problem is the script dying before sending the complete set of headers, or possibly any at all, to the server. To see if this is the case, try running the script standalone from an interactive session, rather than as a script under the server. If you get error messages, this is almost certainly the cause of the "premature end of script headers" message. Even if the CGI runs fine from the command line, remember that the environment and permissions may be different when running under the web server. The CGI can only access resources allowed for the User and Group specified in your Apache configuration. In addition, the environment will not be the same as the one provided on the command line, but it can be adjusted using the directives provided by mod_env.

The second most common cause of this (aside from people not outputting the required headers at all) is a result of an interaction with Perl's output buffering. ... If your script isn't written in Perl, do the equivalent thing for whatever language you are using (e.g., for C, call fflush() after writing the headers).

Another cause for the "premature end of script headers" message are the RLimitCPU and RLimitMEM directives. You may get the message if the CGI script was killed due to a resource limit.

In addition, a configuration problem in suEXEC, mod_perl, or another third party module can often interfere with the execution of your CGI and cause the "premature end of script headers" message.
EDITED TO ADD:  I'm not sure that the new host is the problem... I found the new host, hostgator.com, in the thread "Quality Hosting Companies?" at http://forum.cmsmadesimple.org/index.ph ... 157.0.html.

Thank you!

Books
Last edited by Books on Sun Dec 03, 2006 7:42 am, edited 1 time in total.
Books

Re: 500 Internal Server Errors

Post by Books »

I found an older thread about this exact issue, but no one figured it out then, either. The thread is "Can't install" at http://forum.cmsmadesimple.org/index.ph ... 451.0.html

One of the posters said, "as for me, I have got 500 error due to wrong permissions to folders (775 instead of 755) after extracting archive via c-panel."

What should the permissions on the files be?

I'm grasping at straws, I know...

Thank you!!!

Books
Books

Re: 500 Internal Server Errors

Post by Books »

I think it's fixed!  :D I found an old thread from earlier this year about servers with suEXEC installed. I tried the suggested changes to the permissions and they seem to be working.

Permissions and CHMOD
http://forum.cmsmadesimple.org/index.ph ... 030.0.html

Here are the suggested settings given. The last one, "chmod 711 admin" reads "chmod 771 admin" in the original post but it didn't work for me.

chmod 711 tmp/templates_c
chmod 711 tmp/cache
chmod 711 uploads
chmod 711 uploads/images
chmod 711 modules
chmod 711 install
chmod 644 install/install.php
touch config.php
chmod 644 config.php
chmod 711 admin


There is also a related thread here:

Help with PHPsuExec...
http://forum.cmsmadesimple.org/index.ph ... 853.0.html

I want to thank everyone who helped me! I appreciate you! Thank you!!!  ;D

Books
Locked

Return to “[locked] Installation, Setup and Upgrade”