WordPress.org

Ready to get started?Download WordPress

Forums

Premature end of script headers: index.php (20 posts)

  1. Daisyhead
    Member
    Posted 7 years ago #

    My site was running just fine up until about half an hour ago when I attempted to access my index page and I am now getting 500 Internal Server Errors. I checked my error logs and I am getting the following error message:

    Premature end of script headers: /home/xxxx/public_html/index.php

    I am able to login to WP and move around within it, but I just can't get my index.php page to load. I have contacted my host (Jaguar PC) but haven't heard back yet. I did notice that they upgraded their system and Cpanel so I'm not sure if something on this end is causing the problem or if my WP just pooped out on me.

    Any suggestions?

  2. Daisyhead
    Member
    Posted 7 years ago #

    And here is my host's response:

    "I have checked in detail. Everything is same as before on the server. Nothing has been changed regarding any setting. The problem seems to be with scripts. Please make sure that you have not changed any paths of your scripts. I have checked few of your scripts are using the "require_once()" function."

    I haven't done anything with my WP or any scripts so I am at a loss as to what is causing this so I have no idea how to fix it.

    Can anyone offer me any help?

  3. Chris_K
    Member
    Posted 7 years ago #

    Find a new host? :-p

    What happens if you change themes? Does your site work with Default or Classic?

  4. Daisyhead
    Member
    Posted 7 years ago #

    Well dang! Let me try that and see... nope. That doesn't work either. Still getting inter server errors. The strange thing is that everything else works. My WP itself works and I can see individual entries and my WP pages. Example below:

    http://daisyhead.org - no workie
    http://daisyhead.org/2007/01/books-for-sale/ - workie

    So it's obviously just my index.php file but I can't figure out what the hell is going on. =(

    PS - How on earth do I quote text in this forum??

  5. Daisyhead
    Member
    Posted 7 years ago #

    And of course my host is now pulling their infamous "it's a script issue with WP and we don't support WP." They are telling me that it's a script issue because my index page is using includes and calling in files from other pages and directories. Well, my sub-pages within WP are set up the exact same way as my index file which means if that were the case then my sub-pages would be giving 500 internal server errors as well.

    Could somebody please help me try to figure out what's going on? I don't want to have to wipe everything out and start over but it's obvious I'm not going to get any help from my host and I'm tired of their blaming my website problems on WP as a way to get out of actually helping me.

    I'm going to go into serious girl mode and start bawling in a minute. Ugh!

  6. Daisyhead
    Member
    Posted 7 years ago #

    Isn't there a way to get the actual error to print to the browser to find out what exactly is causing the error? I'm looking on the Internet right now but haven't been able to find anything in layman's terms.

  7. Chris_K
    Member
    Posted 7 years ago #

    Something like this at the top of the index.php I think?

    <?php error_reporting(E_ALL); ?>

  8. Kafkaesqui

    Posted 7 years ago #

    Have you installed a plugin recently? If so, try disabling it (or them).

    Also, oftentimes a 500 error is related to the Apache mod_rewrite code, so you could (temporarily) remove the .htaccess from your root directory to see if that clears it up.

  9. Daisyhead
    Member
    Posted 7 years ago #

    HandySolo - that didn't work. I couldn't get it to print out the actual error.

    Kaf - I removed my mod_rewrite code from my .htaccess file and I am still getting the 500 Internal Server errors.

    If I could find out what the actual error is, or what script is causing it, I would have a better shot at figuring this out. It's so frustrating.

  10. DianeV
    Member
    Posted 7 years ago #

    Are you able to FTP into the site -- and verify that the index.php has the correct file date as the one you originally uploaded? You could also try uploading a new index.php.

    The other thing that comes to mind is a blocking of the root directory (that is, site.com/) via either the .htaccess file or the server configuration file. It's pretty easy to make a mistake with those.

  11. Daisyhead
    Member
    Posted 7 years ago #

    I haven't made any modifications to my .htaccess file recently. I can FTP in and I have tried replacing the index file with a new one. I even tried resorting back to one of the default themes and the same errors keep occurring.

    I'll ask my host if they have somehow blocked my index file by mistake. They keep saying it's a WP issue though.

  12. Daisyhead
    Member
    Posted 7 years ago #

    Interesting, here is the reply from my host:

    I have digged this issue further and the problem that I am able to identify is with the IP that was causing the issue. It appears strange but I have checked it because your website was not loading directly but when I accessed it using the temporary URL then it loaded fine. I have changed the IP of your domain and it will take couple of hours for the DNS propagation. After that the domain will start loading fine.

    Their response was at 5:50 a.m. this morning it's now 9:00 a.m. my time and I'm still getting the errors on my index page. I just knew it wasn't a WP issue. I am SO tired of hosts always wanting to blame WP whenever there is an issue. I think sometimes they take that route just to get out trying to figure out what is actually going on.

    I guess I just wait and see now.

  13. Daisyhead
    Member
    Posted 7 years ago #

    Well I did a little test on my own. I removed the WP index.php file from my root directory and replaced it with a test index file and that file showed up fine with no errors. When I replaced the test index file with the WP index file, the errors are now back. Here's what's in the index file in my root directory:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');
    ?>

    So it does appear that the problem is with this index file but my problem is that I can't figure out what's causing the premature end of script headers error and why this is happening all of a sudden with no changes to my WP installation, etc. Any other thoughts or ideas?

  14. Daisyhead
    Member
    Posted 7 years ago #

    I'm not sure if this related at all, but I did have an issue last week after activating the AMM plugin. I get the following errors whenever I activate a plugin:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'xxxx_wordpress' at line 1]
    SHOW TABLES FROM xxxx_wordpress;
    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xxxx/public_html/wp-content/plugins/amm.php on line 41
    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/wp-includes/wp-db.php:104) in /home/xxxx/public_html/wp-content/plugins/post-levels.php on line 103
    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/wp-includes/wp-db.php:104) in /home/xxxx/public_html/wp-content/plugins/post-levels.php on line 104

    But the error went away after I activated the plugin and I haven't seen it since, until today when I went to deactivate and reactivate a plugin. Could this error be connected to the problem with my index.php file and if so, why did the problem with my index.php file just show up yesterday and not last week? Just trying to throw things out there to get this fixed.

  15. Daisyhead
    Member
    Posted 7 years ago #

    Okay, it turns out this is some sort of a WP issue. Here's my latest update from Support:

    Yes I can see the IP is propagated and it appear to be some thing more than IP issue , what I have tracked is that the require function in your index.php is throwing the error , you have below code there:

    ---

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');
    ?>

    ---

    The line 'require('./wp-blog-header.php');' is loading the page and this is the line throwing the error , but if this page is loaded directory it loads fine , please see the link below:

    http://daisyhead.org/wp-blog-header.php

    Have you tried using some other function for including the page , I believe its the require function causing this issue. Please tell us if some other include function works for you.

    So it appears there is some sort of problem with my function but again, I don't know what would be causing this all of a sudden.

    Is there another way to call this function so my main index page will work again?

  16. Daisyhead
    Member
    Posted 7 years ago #

    Okay, sorry for all the posts on this topic! My website is back up and running but my Support had this to say about my WP:

    We have looked into it in detail. Due to RLimitMEM parameter of Apache the error was generated. We have now increased the parameter and your site is now loading fine. Please check at your end to confirm.

    And a reply to me in their support forum said this:

    Your WP is hitting memory limits. I have increased the process memory. You may still check with wp to make sure you have the latest/stable version.

    What would cause WP to hit it's memory limits? Was the problem really caused by WP or are they just saying that to get out of compensating me for my downtime? Inquiring minds want to know!

  17. Chris_K
    Member
    Posted 7 years ago #

    Well, we've seen plugins cause errors due to hitting memory constraints. Typically (ime) that is usually fixed by adjusting PHP's max mem setting upwards. (default is often 8MB)

    RLimitMEM is a new one on me..., but I'm apache'tarded.

  18. piotrbudny
    Member
    Posted 7 years ago #

    I've got similar problem (I didn't noticed it in WP < 2.1).
    Some browsers (FF under Win, links, konqueror) showed me 500, the apache log showed:
    Premature end of script headers.

    The error showed only when I was accessing the post perm link.
    Main page and the list of posts was ok.

    I've commented out gzip_compression() in wp-blog-header.php and it works now. A bug?

    I'm using su_php, mod_rewrite.

    Regards,
    Piotr Budny

  19. mazter
    Member
    Posted 7 years ago #

    I'm having same issue with my server. I read other threads but changing file permission to 755 did not work for me. Also playing with memory should not be an option since nothing was changed (code and configuration) on server. Weird thing is; this started happening all of sudden and absolutely nothing was changed on server as far as configuration goes. Another weird thing is; this error shows up on couple of scripts not all site. The third weird thing is that two scripts are nearly exactly the same and while one works one, the other doesn't. When I run scripts through shell, I got this error;
    *** glibc detected *** malloc(): memory corruption: 0x0a21a3c0 ***

    Any suggestion really appreciated.

  20. rayne
    Member
    Posted 6 years ago #

    I too recently started having this problem. I've contacted my host to see if it is fact a memory limit problem. If so, I'll remove some of my plugins and see if that solves the problem.

Topic Closed

This topic has been closed to new replies.

About this Topic