WordPress.org

Ready to get started?Download WordPress

Forums

500 Error installing 2.3 (26 posts)

  1. KentWA
    Member
    Posted 6 years ago #

    I am having issues getting 2.3 to run. My first effort was an upgrade of a newly installed 2.2 version. I had not even had the chance to upload themes or anything to this install before 2.3 came out. So I followed the upgrade procedure and got a 500 error right out the gate firing upgrade.php. After a few other aborted attempts I replaced the 2.3 files with the 2.2 code and the site came right up and runs fine on 2.2.

    Just a short tiime ago I attempted an install of 2.3 to a brand new domain. I get a 500 error on that site as well when running install.php. How can I figure out what might be causing the 500 error? There is obviously something different between 2.2 and 2.3 that can cause this issue, but I have found nothing in the documents.

    Thanks,
    Kent

  2. MichaelH
    Member
    Posted 6 years ago #

    Check your logs, you may need to increase memory available to PHP--if so talk with your host.

  3. KentWA
    Member
    Posted 6 years ago #

    I am getting the error:
    ALERT - canary mismatch on efree() - heap overflow detected (attacker '67.160.110.95', file '/hsphere/local/home/kentogle/kentogletree.com/wp-includes/taxonomy.php', line 11)

  4. MichaelH
    Member
    Posted 6 years ago #

    Wow, a google search of that tells me you better talk to your host!

    http://www.google.com/search?q=canary+mismatch+on+efree

  5. KentWA
    Member
    Posted 6 years ago #

    A quick read does indicate lead one to believe that, however an indepth read shows that the Suhosin Patch to the installation caught an attempt by the script to free memory that had already been freed. The Suhosin Patch is actually intended to catch these types of attempts.

    So I guess it is back to 2.2 for me.

  6. KentWA
    Member
    Posted 6 years ago #

    I have limited time to chase issues and try to come up with a solid bug report. However here is what I have done and I get the same results very time.

    Running on FreeBSD 6.1 and PHP 5.2.2 with the Suhosin Patch I get a 500 error firing the Install.php on a new install or upgrade.php on an upgrade. This occurs on 4 different servers with 2 different hosting providers with simuler configurations. It also occurs on a PHP 5.2.4 installed server also running FreeBSD that a friend manages. I see quite a few other reposts in these forums and blogs about 500 Errors, so I am not the only one seeing these issues.

    The previously cited google search mostly centers around reports for PHP 4.x, citations againest PHP 5.x show the issues turned out to be with the script from the ones I read.

    Kent

  7. rawiriblundell
    Member
    Posted 6 years ago #

    Hi Kent,
    it's not much help I know, but I am having the exact same problem, again on a FreeBSD server, again with the Suhosin patch (apparently it comes by default with FreeBSD?) If you'd like we can compare phpinfo's and see what else we have in common?

  8. mattmmatt
    Member
    Posted 6 years ago #

    I'm having intermittent "500 Internal Server Error" issues with my 2.3 install with phpwebhosting.com

  9. MichaelH
    Member
    Posted 6 years ago #

    mattmmatt - what are your log files saying?

  10. mattmmatt
    Member
    Posted 6 years ago #

    MichaelH - on my shared host I only can see the access log, which did not mention the error.

    Now the wild thing is, I spent quite some time working on the problem last night to no avail. This morning I find that the site seems to be running fine.

    #update
    I simply downloaded and expanded a new plugin in the plugins folder, and when I went to activate I encountered the error again. Now the error is happening frequently on my site again.

    Last night I saw people with issues with PHP memory. It appears my PHP install max memory is at 32M, which seems to be quite above anyone else needed. Hrm.

  11. wpress123
    Member
    Posted 6 years ago #

    Same exact problem here. I installed v2.3 on FreeBSD with hsphere and it doesn't seem to want to work spittng out the same error code you get.

    I also installed v2.2.3 and that works just fine albeit sloooooow to load most of the time. Maybe there's a page caching plugin to fix that issue i can play with. I may have to go down to v2.2 which is working perfectly on a different domain but same server.

    So it looks like something critical did indeed change between 2.2 and 2.3. The question still remains though....what?

    Somehow I don't think it's a flaw in php itself....if wordpress is built to hog that much memory, well, that may be something to look into for new versions?

  12. Meo
    Member
    Posted 6 years ago #

    I am having that dreadful problem with heap overflow too, didn't notice when it started though, most likely with the upgrade to WP 2.3. My domain logs show these errors:

    [Thu Nov 22 10:22:27 2007] [error] ALERT - linked list corrupt on efree() - heap corruption detected (attacker '65.111.210.184', file '/usr/home/username/domainname.com/htdocs/wp-settings.php', line 190)
    [Thu Nov 22 10:23:38 2007] [error] ALERT - linked list corrupt on efree() - heap corruption detected (attacker '201.141.145.223', file '/usr/home/username/domainname.com/htdocs/wp-settings.php', line 192)
    [Thu Nov 22 10:23:55 2007] [error] ALERT - linked list corrupt on efree() - heap corruption detected (attacker '88.131.106.6', file '/usr/home/username/domainname.com/htdocs/wp-settings.php', line 197)

    The errors do not happen all the time, in fact i can't find any patterns (can happen 10 times in 15 minutes, then nothing for the next 2 hours). Sometimes i even find my own ip in the logs, which is telling me it is not bot attack or something. Notice it's a different line of wp-settings.php every time that is causing the error.

    Each time an error occurs apache most likely hangs and the server becomes very slow for some time, or until apache's graceful restart. PHP memory has been upped to 16, 24 and 32 mbs and it didn't help. Tested this on two different servers with two different PHP versions (4.4.4 and 4.4.7), only to the same result.

    Currently i use wp 2.3.1 with custom theme and 3 plugins (WP-PageNavi, Peter's Custom Anti-Spam and Kottke Style Archive), all others that used to run fine before were disabled until i can fix the error.

    I can't believe noone else is having such problems. I have tried almost anything that was recommended, but to no avail. Shall i try to recompile PHP without Suhosin patch?

  13. Meo
    Member
    Posted 6 years ago #

    settip up a cron job to restart apache every 30 minutes seems to have helped. But isn't it kind of not right way to solve problems?

  14. Meo
    Member
    Posted 6 years ago #

    reinstalled php with no Suhosin patch. The errors stopped appearing, but the system is still slow

  15. rawiriblundell
    Member
    Posted 6 years ago #

    OK, I have an update on this.

    My hosting is FreeBSD 6.1, PHP 5.22 w/ Zend2, Suhosin Patch v0.9.6.2, and Apache 1.3.3.7. Given that WP 2.2.x works fine on this, I assume I'm meeting minimum requirements.

    I have a test subdomain with an .htaccess file with the following contents to override my hosting defaults:
    php_value memory_limit 32M
    php_value post_max_size 16M
    php_flag display_errors on
    php_flag suhosin.cookie.encrypt Off
    php_value suhosin.request.max_vars 2048
    php_value suhosin.post.max_vars 2048

    I'm trying to give php some more memory to work with as suggested elsewhere in WP support while getting suhosin to back off a bit: this is a vbulletin hack for the same sort of 500/blank screen issue. I have tested with default perms, recursive 644 and recursive 755 all with the same results. I tried with both a hand coded wp-config.php and a wordpress generated one.

    After some teething problems with missing files where the php display errors helped out, I was back to a 500 Error. Checking the error logs it seems that Suhosin really doesn't like what wordpress is doing:

    ALERT - canary mismatch on efree() - heap overflow detected (attacker '203.110.28.91', file '/hsphere/local/home/whetu/test.rawiriblundell.com/wp-includes/taxonomy.php', line 11)
    [Wed Dec 26 18:32:27 2007] [error] [client 203.110.28.91] Premature end of script headers: /hsphere/local/home/whetu/test.rawiriblundell.com/index.php

    Commenting out line 11 of wp-includes/taxonomy.php like so:
    // $wp_taxonomies['category'] = (object) array('name' => ‘category’, ‘object_type’ => ‘post’, ‘hierarchical’ => true, ‘update_count_callback’ => ‘_update_post_term_count’);

    will get wordpress installed and working, however it will be littered with errors. Removing the error display line from .htaccess will probably resolve this, however I doubt WP will function properly.

    As far as this issue goes, the WordPress devs have dismissed it as not their problem:
    http://trac.wordpress.org/ticket/5228

    Interestingly though, WP 2.2.x has exactly the same line of code in wp-includes/taxonomy.php yet WP 2.2.x appears to install and work fine. Note also that I have php 5.2.2 which should have the suhosin fix mentioned in the thread that the WP devs linked to when dismissing this problem. You may now raise one eyebrow and stroke your chin as if you are intruiged.

    It's clear though, looking around WP support, that multiple people have this issue, and I bet that they're on different server configurations than me, and that like me, they or their hosting providers won't be entirely incompetent at setting up php with suhosin. So maybe this could warrant a closer look... or not.

  16. oldwebgeek
    Member
    Posted 6 years ago #

    I know very few people who can run v2.3. I can't upgrade ANY of my blogs past v2.2.2 becuase of this 500 Server error. And that's on different server configs.

  17. alexpope
    Member
    Posted 6 years ago #

    I did some investigation (prior to finding this support topic) and found similar results with commenting out lines 11 to 13 of taxonomy.php. I took it a little further and added a var_dump($wp_taxonomies) after the assignment lines to see if the assignments were working or not.

    With this additional line in the code, it magically started working properly (no 500 errors) with none of the lines commented out. I tried replacing this with an echo "Test" (also with a couple other strings) to see if just outputting some text resolved the issue but I was back to the 500 errors.

    I also tried changing this to var_dump("") which also seems to resolve the problem... if you don't mind the string(0) "" at the top of every page.

    I have not yet tried moving the var_dump line elsewhere.

    I am using PHP version 5.1.5 and MySQL 4.1.20 on Apache 2.0.52 with eHosting.ca.

    After doing some google searches I stumbled onto the fact that output_buffering is set to 4096 on my host and wondering if this is related (I think var_dump may interact with this somehow and resolves the issue).

    I am reasonably good at the programming side but don't know much about configuration. I think I can override the php.ini setting for output_buffering in a .htaccess file but could use some direction as to how to do this so I can test if this resolves the issue.

  18. whooami
    Member
    Posted 6 years ago #

    I know very few people who can run v2.3. I can't upgrade ANY of my blogs past v2.2.2 becuase of this 500 Server error. And that's on different server configs.

    That is such nonsense. I JUST upgraded 3 blogs on 3 different hosts to 2.3.2 with NO ill effects. I JUST installed a fresh copy of 2.3.2 to another host.

    This is a support site, not a "hey my wordpress blog kicks ass" web site. The posts here are going to reflect problems NOT successful installs and upgrades.

    Some million odd ppl use wordpress, and I DONT see a million odd posts saying that their blogs are broke.

    Normal people with normal hosts that provide the normal requirements dont have issues.

    Ive upgraded AND/OR installed WP 2.3.2 on a small orange, godaddy, hostgator, and bluehost, ALL within the last week.

    Learn to use some common sense when you write.

  19. ThePhoenixBird
    Member
    Posted 6 years ago #

    Hi there, i just have moved to another hosting and also have the SAME issue, they have Suhosin patch installed that blocks the taxonomy.php memory usage and generates that 500 error. Also Suhosin guys said this:

    FreeBSD PHP2.5.1 version is buggy and needs to be updated to FreeBSD PHP2.5.1_2

    They told me to add this lines to my .htaccess file:

    zend.ze1_compatibility_mode Off
    php_value memory_limit 32M

    And IT WORKED!!!

    I hope that this may help you.

    Regards
    ThePhoenixBird

  20. MacAddict
    Member
    Posted 6 years ago #

    OK... I had this same 500 issue with upgrading from 2.2.x to 2.3.x before, and got so frustrated, I dropped it and stayed 2.2.x

    So here I am again with a new build of 2.3.3 and I still cannot get either an upgrade or raw install to work.

    I have expanded the memory requirements for php via htaccess, which does nothing. I still get the 500 error.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    # php_flag display_errors on
    php_value memory_limit 16M

    As per phpinfo(), my server is running:

    FreeBSD 6.1-STABLE FreeBSD 6.1-STABLE #0:

    mySQL:

    Server version: 4.0.26

    As others have had, I have no access to the raw log files, as this is a shared hosting account. The logs I see are just access logs, and give no reason as to the error.

    Now, I realize this is a server issue, as my local Macintosh displays the correct screens via HyperEdit, (macs render php almost natively) but what could possibly be preventing it from working correctly on a unix server? Does mySQL have to be a newer version?

    Any help/guidance is appreciated, as I would like to keep up with the most current builds. I have a number of other websites that need to be taken to current builds.

  21. MacAddict
    Member
    Posted 6 years ago #

    #UPDATE:

    ThePhoenixBird's solution above works. In my first try of it, I did not bump the memory to 32M, but left it at 16M, which in turn I still got the same error.

    So, if you are running on Linux and getting these errors, I would definitely try inserting

    zend.ze1_compatibility_mode Off
    php_value memory_limit 32M

    into your .htaccess file and see if that resolves it. It appears to have solved my issues.

  22. oldwebgeek
    Member
    Posted 6 years ago #

    PhoenixBird's solution does work for me too, but there was a mistake in the .hraccess code. The "zend.ze1_compatibility_mode" directive is a PHP Flag. Therefore, you need to specify the "php_flag" instruction before it.

    The proper .htaccess directives should look like:

    php_flag zend.ze1_compatibility_mode Off
    php_value memory_limit 32M

  23. nsyng
    Member
    Posted 6 years ago #

    I've been struggling with the .htaccess options with no success. In fact adding the two lines exactly as they are listed above was throwing "500 Internal Server Error" even for something as simple as phpinfo()!

    The two lines to be added to .htaccess should be:

    php_value memory_limit 32M
    php_flag zend.ze1_compatibility_mode Off

  24. nsyng
    Member
    Posted 6 years ago #

    OldWebGeek - you've hit the nail on the head! :o)

    Just realized that you've already pointed this out. I am so glad it has finally fixed the problems I was struggling with for weeks now.

  25. rawiriblundell
    Member
    Posted 6 years ago #

    That did the trick, one problem though: The wordpress install appended #BEGIN WordPress onto the end of the last line in .htaccess, breaking a php_value line and resulting in more 500's, which might show in error.log as database object missing errors - on a fresh install with blank db tables, nothing has been populated yet.

    Kent, can you test this fix and see if it sorts you out, then the thread can be declared solved. MichaelH, what needs to be done to get a patch into WordPress that updates the .htaccess write from:
    #BEGIN WordPress

    #END WordPress

    to (at least):

    #BEGIN WordPress
    php_flag zend.ze1_compatibility_mode Off

    #END WordPress

    ?

  26. morphew
    Member
    Posted 6 years ago #

    Hi!

    I found a more hackier solution that fixed it for me before I read the whole thread.
    I directly edited the taconomy.php

    In lines 11 to 13 I took out the (object) casts.

    $wp_taxonomies['category'] = array(...);
    $wp_taxonomies['post_tag'] = array(...);
    $wp_taxonomies['link_category'] = array(...);

    And in the function get_taxonomy( $taxonomy ) I added the (object) cast again in line 68:

    return (object)$wp_taxonomies[$taxonomy];

    So far I didn't notice any errors. But I didn't test every part of wordpress after changing. So use with caution!

Topic Closed

This topic has been closed to new replies.

About this Topic