当我想使用另一个版本的 PHP 时,Apache 不起作用


Apache does not work when I want to use another version of PHP

My Wamp 服务器在最新版本的 PHP 上运行良好。但是我需要用旧版本的 PHP 运行它,当我切换到旧版本时,Apache 无法启动,Wamp 图标保持橙色。

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

错误日志:

[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.

Pedram,

莎拉是对的。

WAMPServer网站上提供的所有PHP ADDONs都被编译为32位。

如果您安装了 WAMPServer 64 位,您将拥有 64 位 Apache,如果您随后安装 PHP5.2.8 的插件,这将是 32 位,这将不起作用。

如果您需要运行 PHP5.2.8,则必须安装 WAMPServer 32 位,然后添加 PHP5.2.8 插件。32位WAMPServer可以在64位Windows上运行良好,找到32位PHP和Apache扩展比找到64位扩展要容易得多。

编辑:提问者更改为32位WAMPServer

好的佩德拉姆,

现在的问题是你有Apache 2.4.4(用MSCV10编译(和PHP5.2.8(用MSVC6编译(

这种组合是行不通的。

您还必须安装使用 MSVC6 编译的 Apache,因此请尝试 Apache 2.2.22。

我是否可以建议您也阅读WampServer论坛上名为Wampserver 2.4安装后该怎么办的帖子。

似乎WAMPServer 2.4有点匆忙,并且有很多小问题,其中大多数问题仅在您尝试在Apache和PHP版本之间切换时才会影响您,这当然正是您要做的。

如果您在阅读后仍然遇到问题,您可以在WampServer论坛上与我联系,我可以提供使用TeamViewer解决您的问题。