MAMP Pro 4中的Apache已停止工作,拒绝启动 [英] Apache in MAMP Pro 4 has stopped working, refuses to start

查看:589
本文介绍了MAMP Pro 4中的Apache已停止工作,拒绝启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已经有一段时间使用MAMP Pro了-主要是版本3,前不久已升级到4.

Have been using MAMP Pro for a fair while - version 3 primarily, upgraded to 4 a while ago.

我根本没有任何异常问题,但是今天Apache服务无法启动,告诉我检查错误日志.不幸的是,日志为空白...我没有进行任何系统配置更改,也没有对MAMP/MAMP Pro进行更改.昨天关闭我的系统,今天开始,它不再起作用...

I haven't had any unusual issues at all, but today the Apache service failed to start, telling me to check the error logs. The logs were blank unfortunately... I've made no system configuration changes, no changes to MAMP/MAMP Pro. Shut down my system yesterday, started today, it no longer works...

我尝试了通过Stack Overflow和Google找到的许多建议,但都没有成功.

I've tried numerous suggestions found via Stack Overflow and Google without any success.

即使完全卸载并重新安装了MAMP Pro,我也无法启动该服务.

Even after completely uninstalling and re-installing MAMP Pro I am unable to get the service to start.

日志中什么也没有显示...

Nothing appears in the logs...

在命令行上手动启动它时,出现与PHP相关的错误:

When starting it manually on the command line it comes up with a PHP related error:

$ Applications/MAMP/bin/apache2/bin/apachectl start

httpd: Syntax error on line 135 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/bin/php/php5.2.17/modules/libphp5.so into server: dlopen(/Applications/MAMP/bin/php/php5.2.17/modules/libphp5.so, 10): image not found

令人困惑的是,我根本没有在任何地方指定PHP 5.2.17-根据MAMP Pro,它应该使用PHP 7.0.12.

The confusing thing is that I don't have PHP 5.2.17 specified anywhere, at all - according to MAMP Pro it should be using PHP 7.0.12.

如果使用适当的MAMP Pro对话框将PHP 5.2.17添加到MAMP,Apache仍然无法通过MAMP Pro界面启动.我现在可以从命令行手动启动它,但是似乎没有加载任何虚拟主机/etc.

If I add PHP 5.2.17 to MAMP using the appropriate MAMP Pro dialogs, Apache still fails to start via the MAMP Pro interface. I can now start it manually from the command line however, but none of my virtual hosts/etc seem to be loaded.

apachectl -V告诉我它正在使用/Applications/MAMP/conf/apache/httpd.conf,但是该文件中没有任何内容引用/Library/Application Support/appsolute/MAMP PRO/conf

apachectl -V tells me it's using /Applications/MAMP/conf/apache/httpd.conf, but there is nothing in that file that has any reference to any of the configs generated in /Library/Application Support/appsolute/MAMP PRO/conf

似乎主机条目也没有添加到/etc/hosts.

It also looks like hosts entries aren't added to /etc/hosts.

即使我告诉/Applications/MAMP/conf/apache/httpd.conf除了添加/Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf也不做任何事情(并手动向/etc/hosts添加条目),它似乎还是不起作用...

Even if I tell /Applications/MAMP/conf/apache/httpd.conf to do nothing but include /Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf (and manually add entries to /etc/hosts) it still doesn't seem to work at all...

我和我的同事完全不知所措,特别是考虑到昨天它正在工作...

I and my colleagues are at a complete loss, especially given it was working yesterday...

有人有这样的问题吗?

推荐答案

我设法解决了您遇到的类似问题. 我的Apache服务器工作正常,然后更新到4.0.6之后,我遇到了类似的问题.

I managed to fix the similar issue you had. My Apache server was working fine and then following updating to 4.0.6 I experienced similar issues.

我做了2件事来解决此问题.我在5.2.17中找不到php文件时遇到了同样的错误.通过在MAMP中添加5.2.17修复了该问题之后,我遇到了有关用户权限的apache错误.

There were 2 things I did to fix the issue. I was getting the same error where it couldn't find a php file in 5.2.17. After fixing that by adding 5.2.17 to MAMP I experienced an apache error regarding user permissions.

(22)Invalid argument: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive

文件>编辑模板>将所有模板还原为默认设置. 保存并重新启动服务器,所有服务器终于工作了,我的所有主机也都保留了.

File > Edit Template > Revert ALL Templates to Default Settings. Save & restarted the servers and all worked finally and all my hosts had retained as well.

我以前在httpd.conf文件中输入了一条自定义行,该行已经复制了无数个版本,但是看起来文件夹结构已更改,因此无法找到它,从而导致有关用户权限的异常错误.此后,我以正确的结构重新输入了自定义行,并且一切正常.

I had previously entered a custom line in my httpd.conf file that for countless versions had copied across fine however it looks like the folder structure had changed and so couldn't locate it causing the unusual error about User permissions. I have since re-entered the custom line with the correct structure and all working fine again.

希望这会有所帮助.

这篇关于MAMP Pro 4中的Apache已停止工作,拒绝启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆