InMotion Hosting Support Center

My server keeps getting 500 errors causing a restart of apache

Category: Drupal 7

n/a Points
2014-10-08 8:38 am EST

Hits: 221
Periodically my server is getting 500 errors which requires a reset of the server. When submitted a support ticket the rep indicated that there were 200 error messages in the server log that said "premature end of script header errors in the index.php file". I've tried many fixes suggested online including changes to the php.ini and the .htaccess files. Nothing has worked. What should I do, how do I figure out the cause of this error?

You must login before you can ask a follow up question.

You must login before you can submit an answer.



31,633 Points
2014-10-08 9:26 am EST

Thank you for your question. We are happy to help, but will need some additional information. This is because there are a lot of things that can cause this error.

Have you tried renaming the php.ini file, (or .htaccess file) for example php.ini.old. This will cause your site to use the default PHP settings on the server. You can also contact support to have a copy of the default php.ini copied to your account.

I noticed some modules listed in your /public_html/error_log file. I recommend testing the modules throwing errors. I found many examples in Official Drupal site, of modules causing "premature end of script header errors in the index.php file".

Also, contacting Live Support at the time errors are occurring allows us to review the problem in real-time.

If you have any further questions, feel free to post them below.

Thank you,

You must login before you can post a comment about this answer.

John-Paul thanks for the help!!
There is a php.ini.old file as well. I didn't create it however. Should I remove that? I checked and it has different settings as the regular php.ini file. There's only one .htaccess file.
In regards to the module errors. I see the errors in the error_log file but honestly I have no clue how to test the modules as you indicated. Can you advise as to what I should do?

Thank you,
3 Points
2014-10-08 10:00 am EST
Hello Garrett,

Thank you for your contacting us. The troubleshooting steps remain the same; rename the php.ini (then test your site). If is still having problems, rename the .htaccess file.

If there's already a file named that, name it something else. For example: php.ini.old2, and .htaccess.old5

I have no way of knowing whether you can delete the php.ini.old, as only you or the developer would know.

To test the module, uninstall it and see if the problem stops.

If you have any further questions, feel free to post them below.

Thank you,
9 Points
2014-10-08 10:30 am EST
Like this Question?

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

Need more Help?

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!