• Resolved Adam Lee

    (@adam-lee)


    Howdy folks,

    I just set up a brand-new installation of WordPress 2.5.1 on Apache 2.0.52 and PHP 4.3.9, and my site is drastically slow to load. According to my hosting company, there seem to be some compatibility issues. First, when WP is sending the HTTP header, it emits error trace similar to this, then hangs for a minute or two:

    PHP Notice: Undefined index: SCRIPT_NAME in /var/www/vhosts/default/httpdocs/wp-settings.php on line 91
    PHP Notice: Undefined index: REQUEST_URI in /var/www/vhosts/default/httpdocs/wp-settings.php on line 97

    Also, it’s emitting a huge amount of trace like this:

    [client 67.210.98.250] script '/var/www/vhosts/default/htdocs/wp-cron.php' not found or unable to stat

    Anyone have any thoughts on what might be going on here?

Viewing 1 replies (of 1 total)
  • Thread Starter Adam Lee

    (@adam-lee)

    After further investigation, I’ve fixed all the issues described above. If anyone else has similar problems, here’s what I did to fix them:

    1. Disable the built-in cron module. At least for me, it was hogging the CPU and causing repeated errors as described above. You can fix this by commenting out the call to spawn_cron() around line 135 of wp-includes/cron.php.

    2. In wp-settings.php, there’s use of the HTTP variables $_SERVER[‘SCRIPT_NAME’] and $_SERVER[“REQUEST_URI”] without checking to see if they’re defined. My version of Apache doesn’t define them, causing errors every time a page was loaded. Again, I commented out the code that makes reference to those variables.

    3. The most significant change, the one I described above, is the call to wp_cache_postload() around line 380 of wp-settings.php. Every invocation of this function was taking between five and ten seconds, sometimes more. I believe this is used by WP’s built-in object cache, which I wasn’t even using. I took out this call and performance went way up.

Viewing 1 replies (of 1 total)

The topic ‘Apache compatibility issues in 2.5.1?’ is closed to new replies.