CGI-BIN中PERL不运行的问题

smarthief 2008-11-24 05:35:21
apache和active-perl都装在C盘中
apache中http.conf相关配置:
ScriptAlias /cgi-bin/ "c:/apache/apache2/cgi-bin/"

<Directory "c:/apache/apache2/cgi-bin/">
AllowOverride all
Options all
Order allow,deny
Allow from all
</Directory>

AddHandler cgi-script .pl
AddHandler cgi-script .cgi


编写的测试文件test.pl存放在APACHE中的CGI-BIN文件夹中,用txt直接写,编码为Ansi.
#!c:\perl\bin\perl.exe
print "CGI执行成功!"


在DOS窗口直接运行test.pl成功,可是在窗口运行localhost/cgi-bin/test.pl就显示500error
查看error.log错误如下test.pl is not executable; ensure interpreted scripts have "#!" first line
Bad file descriptor: don't know how to spawn child process: test.pl

内问完了百度,外问外GOOGLE,仍然无解
无奈问CSDN,感激不尽啊
...全文
97 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

24,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧