0

My Wamp server works fine with the latest version of PHP. But I need to run it with an older version of PHP and when I switch to that older version, Apache does not start and Wamp icon remains orange.

Apache version: 2.2.22
PHP version that is working: 5.3.13
desired PHP version (not working): 5.2.8

Wamp server version 2.2

Error log:

[Tue Sep 24 17:15:26 2013] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Tue Sep 24 17:15:26 2013] [notice] Child 8356: Exit event signaled. Child process is ending.
[Tue Sep 24 17:15:27 2013] [notice] Child 8356: Released the start mutex
[Tue Sep 24 17:15:28 2013] [notice] Child 8356: All worker threads have exited.
[Tue Sep 24 17:15:28 2013] [notice] Child 8356: Child process is exiting
[Tue Sep 24 17:15:28 2013] [notice] Parent: Child process exited successfully.
[Tue Sep 24 17:15:34 2013] [notice] Apache/2.2.22 (Win64) PHP/5.3.13 configured -- resuming normal operations
[Tue Sep 24 17:15:34 2013] [notice] Server built: May 13 2012 19:41:17
[Tue Sep 24 17:15:34 2013] [notice] Parent: Created child process 10372
httpd.exe: Syntax error on line 127 of C:/wamp/bin/apache/apache2.2.22/conf/httpd.conf: Cannot load C:/wamp/bin/php/php5.2.8/php5apache2_2.dll into server: %1 \xe4r Not a valid Win32-program.  
[Tue Sep 24 17:15:34 2013] [crit] (OS 6)Referensen (handle) är felaktig.  : master_main: create child process failed. Exiting.
9
  • 1
    Have you checked the Apache error log? That will usually include an error message when Apache fails to start.
    – kunal
    Sep 24, 2013 at 15:13
  • @kunal edited the post with the error log. It says it cannot load php5apache2_2.dll into server because something is not a valid program. Sep 24, 2013 at 15:18
  • 1
    You need a different php that is compiled to match your apache (ts/nts, 32/64, VC6/VC9). windows.php.net/downloads/releases/archives - my guess would be php-5.2.8-nts-Win32-VC6-x86.zip (though I would expect a newer WAMP build to use VC9, I don't see that listed for the version of PHP you are looking for)
    – Sarah Kemp
    Sep 24, 2013 at 15:24
  • And: You try to load both PHP versions (see two lines above the error message, where it says that 5.3.13 is already configured) Sep 24, 2013 at 15:28
  • 1
    This isn't a version problem, it's a compile problem. It looks like you are trying to load a 32-bit PHP dll against a 64-bit apache process. I don't think PHP 5.2 even comes in 64-bit. forum.wampserver.com/read.php?2,87860 You probably need a 32-bit version of apache to run the dll you got from the WAMP site. IMHO, though, just reinstall WAMP and pick 32-bit this time - you will save yourself a world of trouble down the line.
    – Sarah Kemp
    Sep 24, 2013 at 19:36

1 Answer 1

2

Pedram,

Sarah is correct.

All the PHP ADDONs provided on the WAMPServer site are compiled to 32bit.

If you installed WAMPServer 64bit you will have a 64bit Apache, if you then install PHP5.2.8's addon that will be 32bit that will not work.

If you need to run PHP5.2.8 then you must install WAMPServer 32bit and then add the PHP5.2.8 addon. The 32bit WAMPServer will run just fine on a 64bit Windows, and it is a lot easier to find 32bit PHP & Apache extensions than it is to find 64bit ones.

EDIT: After Questioner change to 32 bit WAMPServer

OK Pedram,

Now the problem is that you have Apache 2.4.4 ( which is compiled with MSCV10 ) and PHP5.2.8 ( which is compiled with MSVC6 )

That combination will not work.

You also have to install an Apache that is compiled with MSVC6 so try Apache 2.2.22.

Can I suggest that you also read the thread on the WampServer forum called Wampserver 2.4 What to do after Installing.

It seems that the WAMPServer 2.4 was done in a bit of a rush and has quite a few minor issues, most of which only effect you if you are trying to switch between versions of Apache and PHP, which of course is exactly what you are trying to do.

If you still get problems after reading that, you can contact me on the WampServer forum and I can offer to troubleshoot your situation using TeamViewer.

2
  • I tried again. I installed the 32 bit version of Wamp. I just know I'm running Apache ver 2.4.4. but I don't know if it's 32bit or 64bit. It works fine with the latest version of PHP but when I switch to PHP 5.2.8 it gives me a cmd message saying: "Sorry, This PHP version doesn't see to be compatible with your actual Apache Version, Switch cancelled." And what confuses me is that this message comes from the php folder of the latest version (c:\wamp\bin\php\php5.4.16\php.exe) So I'm not sure what is Apache trying to switch. How I know which version of Apache (32/64) an I running? Sep 25, 2013 at 8:29
  • @RiggaFolly thank you very much. I will get Apache 2.2.22 and see if it works and will read that forum post. I will come back to you. Sep 25, 2013 at 9:08

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.