2006年04月01日 星期六 13:25
我想让我的python程序以apache的CGI模式运行,但是按照google到的CGI配置后,运行始终出错。 [Sat Apr 01 13:30:03 2006] [error] [client 127.0.0.1] C:/Program Files/Apache Group/Apache2/cgi-bin/test.py is not executable; ensure interpreted scripts have "#!" first line [Sat Apr 01 13:30:03 2006] [error] [client 127.0.0.1] (9)Bad file descriptor: don't know how to spawn child process: C:/Program Files/Apache Group/Apache2/cgi-bin/test.py 我的测试程序: #!e:/python/python24/python.exe print "Content-type: text/plain; charset=utf-8"; print "test" 各位帮忙看看是哪里错了? -- My Blog >> http://leejd.cndev.org My QQ >> 9847243 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060401/687745e8/attachment.html
2006年04月01日 星期六 14:21
On 4/1/06, Gerald Lee <leejd80 at gmail.com> wrote: > > 我想让我的python程序以apache的CGI模式运行,但是按照google到的CGI配置后,运行始终出错。 > > [Sat Apr 01 13:30:03 2006] [error] [client 127.0.0.1] C:/Program > Files/Apache Group/Apache2/cgi-bin/test.py is not executable; ensure > interpreted scripts have "#!" first line > [Sat Apr 01 13:30:03 2006] [error] [client 127.0.0.1] (9)Bad file > descriptor: don't know how to spawn child process: C:/Program Files/Apache > Group/Apache2/cgi-bin/test.py > 你的Python是装在 e:/python/python24/ 目录么? -- simple is good http://brucewang.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060401/e9825a30/attachment.html
2006年04月01日 星期六 14:26
是的,我在命令行下面执行是没有问题的 2006/4/1, Bruce Wang <number5 at gmail.com>: > > > > On 4/1/06, Gerald Lee <leejd80 at gmail.com> wrote: > > > > 我想让我的python程序以apache的CGI模式运行,但是按照google到的CGI配置后,运行始终出错。 > > > > [Sat Apr 01 13:30:03 2006] [error] [client 127.0.0.1] C:/Program > > Files/Apache Group/Apache2/cgi-bin/test.py is not executable; ensure > > interpreted scripts have "#!" first line > > [Sat Apr 01 13:30:03 2006] [error] [client 127.0.0.1] (9)Bad file > > descriptor: don't know how to spawn child process: C:/Program Files/Apache > > Group/Apache2/cgi-bin/test.py > > > > > 你的Python是装在 e:/python/python24/ 目录么? > > > -- > simple is good > http://brucewang.net > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > -- My Blog >> http://leejd.cndev.org My QQ >> 9847243 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060401/8723f5e5/attachment-0001.htm
2006年04月01日 星期六 14:48
搞定,需要修改一下conf文件。不过很奇怪,好多apache的配置文档都没有这么描述。 在 Apache 的设定文件 httpd.conf 的末端加入 'ScriptInterpreterSource Registry' 就可以了. 在06-4-1,Gerald Lee <leejd80 at gmail.com> 写道: > > 是的,我在命令行下面执行是没有问题的 > > 2006/4/1, Bruce Wang <number5 at gmail.com>: > > > > > > On 4/1/06, Gerald Lee < leejd80 at gmail.com> wrote: > > > > 我想让我的python程序以apache的CGI模式运行,但是按照google到的CGI配置后,运行始终出错。 > > > > [Sat Apr 01 13:30:03 2006] [error] [client 127.0.0.1] C:/Program > > Files/Apache Group/Apache2/cgi-bin/test.py is not executable; ensure > > interpreted scripts have "#!" first line > > [Sat Apr 01 13:30:03 2006] [error] [client 127.0.0.1] (9)Bad file > > descriptor: don't know how to spawn child process: C:/Program Files/Apache > > Group/Apache2/cgi-bin/test.py > > > > > 你的Python是装在 e:/python/python24/ 目录么? > > > -- > simple is good > http://brucewang.net > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > -- > My Blog >> http://leejd.cndev.org > My QQ >> 9847243 > -- My Blog >> http://leejd.cndev.org My QQ >> 9847243 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060401/ca8d3171/attachment.html
Zeuux © 2025
京ICP备05028076号