php-cgi似乎已经在PHP 5.3.1中消失了。 我已经为./configure尝试了–enable-cgi和–disable-cli标志,但是它不会在sapi / cgi子目录下创build一个二进制文件。
在客户端(浏览器)closures连接之后,如何让Apache杀死它所产生的CGI? 我有几个执行长时间运行的CGI,每15秒发送一次输出。 只要浏览器closures连接,CGI(及其后代)应该被正确地杀死,而不是留在我的系统周围,并保持宝贵的Apache插槽占用。 最好Apache应该杀死他们。 如果没有,我想知道CGI是否有办法检测与浏览器的连接是否已经消失。 编辑:显然,CGI的将closures他们的STDOUT。 一旦写入,他们将得到一个SIGPIPE信号,并可以采取相应的行动(通常他们忽略这个信号)。 在Perl中,你可以这样做: print "fresh output\n" or die "apparently my audience has left the building"; 所以问题依然存在:Apache可以检测到破损的pipe道并清理垃圾吗? 运行Debian w / Apache 2.2.20,以及正常的suexec机制。 谢谢!
我有穆宁工作得很好,但任何时候我尝试做CGI图 – 它只是停止绘图…没有错误的日志,什么都没有。 我按照这里的说明: http ://munin-monitoring.org/wiki/CgiHowto – 它应该工作 – 这是我的munin.conf设置,至less是重要的部分: dbdir /var/lib/munin htmldir /var/www/munin logdir /var/log/munin rundir /var/run/munin tmpldir /etc/munin/templates graph_strategy cgi cgiurl /usr/lib/cgi-bin cgiurl_graph /cgi-bin/munin-cgi-graph 然后主机信息yada yada – graph_strategy cgi和cgrurl在munin.conf中被注释掉 – 这是因为如果我取消注释它们,graphics将停止工作。 再一次,我没有在日志中的错误,只是图像曾经是空白的图像。 注释掉CGI? 一旦munin html再次运行,一切都恢复正常。 我正在运行munin和munin-node的最新版本 – 我试过fastcgi和正常的cgi – 涉及的所有目录的权限都是munin:www-data – 而且我的httpd.conf文件如下所示: ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory /usr/lib/cgi-bin/> AllowOverride None SetHandler fastcgi-script Options ExecCGI […]
出于某种原因,我不能让一个perl脚本在cgi-bin文件夹中运行。 我没有做这些文件,我们已经上传到另一台服务器,他们工作正常。 但是我已经使用了下面的test.pl文件,通过bash(以root身份)和浏览器正常工作。 #!/usr/bin/perl use strict; use warnings; #Useful for testing: Perl error messages, plus your die statements, will get #sent to the browser. Otherwise you will just see "Internal Server Error". use CGI::Carp qw/fatalsToBrowser/; #Always use the CGI module for your scripts. use CGI; #Create simple HTML output (taken directly from CGI documentation). my […]
我一直在使用lighttpd 1.4.28和Ubuntu 12.04在我的虚拟私人服务器上运行一个心理学实验的任务程序 。 这个实验是一个用Perl编写的,用我写的Perl模块编写的CGI程序,在Mechanical Turk上提供了一个Web界面。 数据使用WAL模式存储在SQLite数据库中,DBD :: SQLite提供底层的Perl接口。 对于在土耳其Turk上完成它的大多数工人来说,这个实验似乎工作正常 然而偶尔,用户得到错误DBD::SQLite::db prepare failed: unable to open database file 。 它发生在看似任意点的任务中,包括点击CGI程序生成的100个HTML页面,每个页面都会触发数据库。 当用户刷新页面(我认为 )时,似乎不会消失。 我不知道如何自行复制它,但是我知道它至less有15个用户中的2个。 当发生这种情况时,CPU和内存似乎没有受到重视。 磁盘空间也不是问题,(我只使用1.4 gig的3-gig分区)。 目前该数据库大约是280 kb。 PRAGMA integrity_check; 回来了。 任何想法如何debugging呢? 谷歌告诉我,“无法打开数据库文件”通常是一个权限错误或类似的东西,但所有设置正确; 任务通常起作用。
我最近写了一个基于web.py的独立web服务。 由于不可预见的情况,该服务必须通过IIS运行。 我听说可以在IIS中将web.py作为CGI运行,但是在设置时遇到了麻烦。 我可以运行Python CGI脚本,但是当我尝试运行基于web.py的脚本时,出现内部服务器错误。 错误状态: CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. 作为参考,脚本是: import web urls = ( '/(.*)','hello' ) class hello: def GET(self,name): i = web.input(times=1) if not name: name = 'world' for c in xrange(init(i.times)): print 'Hello, '+name+'!' if __name__=="__main__": web.run(urls) IIS的日志文件在哪里,有内部服务器错误信息? 我必须使用重写ISAPI筛选器来使用IIS上的web.py? […]
我有一个虚拟主机,我想重写/像/ cgi-bin / script?123。 我认为这样的事情会起作用,但是这会重写为“/index.html/”。 RewriteEngine On RewriteRule ^/$ /cgi-bin/script.cgi?123 [L] 你怎么能这样做?
我只是削减我的牙齿得到运行(最新的1.4.1在centos)。 它的工作,但我希望它作为一个CGI前端,所以我不会不断地生成graphics,当我每天看他们几次(明显)。 我已经按照指示,并不断收到我的日志文件中的这个错误。 我不是一个perl大师,所以也不帮助我。 Can't modify division (/) in division (/) at /var/www/html/munin/cgi/munin-cgi-graph line 111, near ");" Execution of /var/www/html/munin/cgi/munin-cgi-graph aborted due to compilation errors. Premature end of script headers: munin-cgi-graph 有什么想法吗?
我经常在网站上发现500个内部服务器错误,所以我查看了错误日志。 我使用安装了Kloxo(lxadmin)的lighttpd。 我有xcache启用。 2011-04-14 04:57:05: (mod_cgi.c.588) cgi died, pid: 14160 2011-04-14 04:57:12: (mod_cgi.c.588) cgi died, pid: 15363 2011-04-14 04:57:19: (mod_cgi.c.588) cgi died, pid: 15492 2011-04-14 04:57:19: (mod_cgi.c.1287) cleaning up CGI: process died with signal 11 2011-04-14 04:57:28: (mod_cgi.c.588) cgi died, pid: 15846 2011-04-14 04:57:28: (mod_cgi.c.588) cgi died, pid: 15845 2011-04-14 04:57:28: (mod_cgi.c.588) cgi died, pid: […]
如何在Apache / 2上设置PHP 5.2.17来通过一个持久的php-cgi实例来提供php请求?