如何从Apache服务器查看错误信息和调试信息?
如今,当运行 WAMP 或 MAMP(或 Mac 上的默认 Web 服务器)时,每当 CGI 文件(例如 Ruby 或 PHP)出现错误时,都不会显示错误消息(也不会显示行号)。有没有办法在 shell 中运行 Web 服务器以便显示任何错误消息?
我试图展示的是 Mac 的内置 Web 服务器。 (也许在其他MAMP或WAMP平台上有点不同)
Nowadays when running WAMP or MAMP (or the default web server on a Mac), whenever there is error from the CGI file (such as Ruby or PHP), the error message is not shown (and no line number either). Is there a way to run the web server in a shell so that any error message is shown?
The one I am trying to show is on a Mac's built-in web server. (maybe it is a little different in other MAMP or WAMP platforms)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在 apache 上默认 Web 服务器的 /var/log/apache2/error_log 中找到 CGI 脚本的错误。
您可以使用以下方式查看实时结果:
You can find the errors of CGI scripts in /var/log/apache2/error_log for the default web server on apache.
You can view realtime results using :