Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
当我想使用另一个版本的PHP时,Apache不起作用_Php_Apache_Wamp_Wampserver - Fatal编程技术网

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

当我想使用另一个版本的PHP时,Apache不起作用,php,apache,wamp,wampserver,Php,Apache,Wamp,Wampserver,我的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 错误日志: [Tue Sep 24 17:15:26 2013] [notice] Parent: Received shutdown signal

我的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

错误日志:

[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.
佩德拉姆

莎拉是对的

WAMPServer站点上提供的所有
PHP插件都编译为32位

如果您安装了64位的WAMPServer,您将拥有64位的Apache,如果您随后安装了32位的PHP5.2.8插件,那么将无法工作

如果需要运行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论坛上的帖子

似乎WampServer2.4是在一段时间内完成的,并且有很多小问题,其中大多数问题只有在您尝试在Apache和PHP版本之间切换时才会影响您,当然这正是您正在尝试的


如果您在阅读后仍然遇到问题,您可以在WampServer论坛上与我联系,我可以提供使用TeamViewer对您的情况进行故障排除。

您查看了Apache错误日志了吗?当Apache无法启动时,通常会包含一条错误消息。@kunal用错误日志编辑了这篇文章。它说它无法将php5apache2_2.dll加载到服务器中,因为某些程序无效。您需要编译不同的php以匹配您的apache(ts/nts、32/64、VC6/VC9)。-我的猜测是php-5.2.8-nts-Win32-VC6-x86.zip(虽然我希望更新的WAMP版本使用VC9,但我看不出您正在寻找的php版本中列出了这一点),并且:您尝试加载两个php版本(请参阅错误消息上方的两行,其中说明已经配置了5.3.13),这不是版本问题,这是一个编译问题。看起来您正试图针对64位apache进程加载32位PHP dll。我认为PHP5.2甚至没有64位版本。您可能需要32位版本的apache来运行从WAMP站点获得的dll。尽管如此,这次只需重新安装WAMP并选择32位,您将为自己节省大量的麻烦。我再试了一次。我安装了32位版本的Wamp。我只知道我正在运行Apache 2.4.4版。但我不知道是32位还是64位。它可以与最新版本的PHP配合使用,但是当我切换到php5.2.8时,它会给我一条cmd消息:“对不起,这个PHP版本与您的实际Apache版本不兼容,开关被取消了。”让我困惑的是,这个消息来自最新版本的PHP文件夹(c:\wamp\bin\PHP\php5.4.16\PHP.exe)所以我不确定Apache想要切换什么。我怎么知道我在运行哪个版本的Apache(32/64)I?@riggafuly非常感谢。我将获得Apache2.2.22,看看它是否有效,并将阅读该论坛帖子。我会回到你身边。
[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.