我最近通过mod_fcgid设置将我的服务器从mod_php设置转换为了php。 一切运作良好:快速,简单,不会崩溃等等等等
我遇到的问题是日志文件填满了这样的消息:
[Sat Nov 14 00:43:17 2009] [notice] mod_fcgid: process /var/www/fcgi-bin.d/php5-default/php-fcgi-wrapper(9451) exit(server exited), terminated by calling exit(), return code: 0 [Sat Nov 14 00:43:23 2009] [notice] mod_fcgid: process /var/www/fcgi-bin.d/php5-default/php-fcgi-wrapper(9453) exit(server exited), terminated by calling exit(), return code: 0 [Sat Nov 14 00:43:27 2009] [notice] mod_fcgid: process /var/www/fcgi-bin.d/php5-default/php-fcgi-wrapper(9457) exit(server exited), terminated by calling exit(), return code: 0 [Sat Nov 14 00:43:27 2009] [notice] mod_fcgid: process /var/www/fcgi-bin.d/php5-default/php-fcgi-wrapper(9459) exit(server exited), terminated by calling exit(), return code: 0 [Sat Nov 14 00:43:41 2009] [notice] mod_fcgid: process /var/www/fcgi-bin.d/php5-default/php-fcgi-wrapper(9463) exit(server exited), terminated by calling exit(), return code: 0 [Sat Nov 14 00:43:47 2009] [notice] mod_fcgid: process /var/www/fcgi-bin.d/php5-default/php-fcgi-wrapper(9461) exit(server exited), terminated by calling exit(), return code: 0 [Sat Nov 14 00:43:58 2009] [notice] mod_fcgid: process /var/www/fcgi-bin.d/php5-default/php-fcgi-wrapper(9466) exit(server exited), terminated by calling exit(), return code: 0
如果我的apache2.conf文件,我有日志设置为E_ALL & ~E_NOTICE 。 我的php.ini文件设置为不logging错误。
我在我的php代码中使用了exit命令,但我不明白为什么会在日志文件中发出通知。 任何input将不胜感激。
在标准的CGI脚本中,服务器启动脚本,发送一个请求,然后期望脚本终止。
在FCGI脚本中,服务器启动一次,并一次发送多个请求。 这意味着您的脚本不应该在单个请求后退出,而只能在错误条件下退出,而不能有效地回答(即使是以500代码回答)。
所以,我相信你一点都不在乎阿帕奇。