简体   繁体   English

PHP更新后Localhost突然停止工作

[英]Localhost suddenly stopped working after php update

Alright, I'm working on a project locally, and I made the mistake of installing grunt, which required ruby installation, and sass etc.. Well Brew must have updated something else because my local environment stoped resolving. 好吧,我正在本地进行一个项目,但我犯了一个错误的安装grunt的过程,这需要安装ruby和sass等。Well Brew必须更新了其他内容,因为我的本地环境停止了解决。

After some digging I found the answer and had to reinstall php5.6 (I know, I know) but the prject I'm working on specifically requires it. 经过一番挖掘后,我找到了答案,不得不重新安装php5.6(我知道,我知道),但是我正在研究的项目特别需要它。 After reinstalling 5.6 everything started working until suddenly, and seemingly inadvertently, my local environment stopped responding again. 重新安装5.6之后,所有操作开始起作用,直到突然之间,而且似乎是无意间,我的本地环境再次停止响应。

I get this is vague but here is all the info I have. 我知道这很模糊,但这是我所拥有的全部信息。 I'm running dnsmasq so I have a .loc address for my sites. 我正在运行dnsmasq,所以我的网站有一个.loc地址。 apachectl configtest says "Syntax OK" localhost:8080 works, however nothing us with that port routes the last log in the apache error_log is: AH00169: caught SIGTERM, shutting down apachectl configtest说“语法正确”,localhost:8080有效,但是该端口上没有任何内容可路由apache的最后一条日志error_log为:AH00169:捕获到SIGTERM,关闭

any clues would be greatly appreciated. 任何线索将不胜感激。

UPDATE-- I ran apachectl -V 更新-我运行了apachectl -V

Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr/local/Cellar/httpd/2.4.37_1"
 -D SUEXEC_BIN="/usr/local/opt/httpd/bin/suexec"
 -D DEFAULT_PIDLOG="/usr/local/var/run/httpd/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/usr/local/etc/httpd/mime.types"
 -D SERVER_CONFIG_FILE="/usr/local/etc/httpd/httpd.conf"

This showed me that the httpd.conf file I was updating was not the one listed in the SERVER_CONFIG_FILE. 这表明我正在更新的httpd.conf文件不是SERVER_CONFIG_FILE中列出的文件。 When I updated this file to listen to port 80, it fixed the port problem, however, now when I go to one of my .loc addresses I get: 当我更新此文件以监听端口80时,它解决了端口问题,但是,现在当我转到自己的.loc地址之一时,我得到:

Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. 服务器内部错误服务器遇到内部错误或配置错误,无法完成您的请求。

Also, Where is the Error log now? 另外,错误日志现在在哪里?

So in case anyone is wondering how this turned out. 因此,万一有人想知道结果如何。

After running apachectl -VI discovered that the httpd.conf file I was originally updating, was not the one being loaded into apache. 运行apachectl -VI后,发现我最初正在更新的httpd.conf文件不是正在加载到apache中的文件。 I found the correct one and made sure I had listening 80. 我找到了正确的人,并确保我听了80。

This solved the original problem but then I was getting a server error when I navigated to my project. 这解决了原始问题,但随后导航到项目时出现服务器错误。 this is because the project has a HTACCESS file and I didn't have the mod_rewrite module loaded into the new httpd.conf file. 这是因为项目有一个HTACCESS文件,而我没有将mod_rewrite模块加载到新的httpd.conf文件中。 Once I uncommented this line it worked. 一旦取消注释此行,它就会起作用。

My php still doesn't work but that because of Mongo but that's another story. 我的php仍然无法正常工作,但是由于Mongo而已,但这是另一个故事。 Hope this helps some people. 希望这对某些人有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM