When my script runs the 4th line below in WP 2.9.2, its causing my web app to throw an "Apache HTTP Service has stopped working" error

$myqueryCurrent = new WP_Query();

Do you see something in that 4th line that's incompatible with WP 2.9.2? The code runs fine on the same server under WP 3.0.4

Here's the details of the error:

Problem signature: Problem Event Name: APPCRASH Application Name: httpd.exe Application Version: Application Timestamp: 4aeb9704 Fault Module Name: php5ts.dll Fault Module Version:

2 Answers 2


Executing the code you posted results in a crash inside the PHP module. I assume you're running PHP as module inside apache on windows, if the module crashes, apache crashes as well.

Ensure that you're using the right PHP modules here. Are you sure you need the Thread-Safe variant of PHP for apache? Those are reported to not run stable under windows IIRC.

So this might not be related to the wordpress version but to the server configuration.

Hope this answer helps a bit tackling things down.

  • I'm running xampplite on windows 7 laptop. How can I configure it to more closely emulate say, hostgator or bluehost's default Apache/PHP setups? I'm trying to code locally and emulate final hosting conditions as much as possible.
    – Scott B
    Feb 9, 2011 at 18:54
  • @Scott B: By running Linux on your computer e.g. in a virtual environment. Turnkey is for an easy start. There is a LAMP Stack Appliance - Web Stack (MySQL) and even WordPress Appliance which are ready to run with VirtualBox on windows for example.
    – hakre
    Feb 9, 2011 at 19:36

Realise this old now, but this may help people finding this via Google:

I had problems with Apache dying when running similar code within a function called by the pre_get_posts hook. Problem was I missed the conditional:


meaning it was doing work for all the queries, not just the main one. Adding that fixed the problem for me. The full conditional I use is (then other code above below that:

if ( ! is_category() || ! $query->is_main_query() || ! is_a( $query, 'WP_Query' ) )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.