English 中文(简体)
阿帕奇与Macports Perl5.8共同执行CGI。
原标题:Apache won t execute CGIs with Macports Perl5.8.9

Im试图在我的阿帕奇2号海港安装下车。 我想要一个经验丰富的 per子可以帮助我。 I ve...

  1. Got Apache running just dandy. Macports installed it with perl5 placeholder and perl5.8.9.
  2. Installed mod_perl2.
  3. Run the script to configure httpd.conf.
  4. Restarted apache.
  5. 参看以下试卷:

    #!/opt/local/bin/perl
    print "content-type: text/html 
    
    ";
    print  Hello world. ;  
    

我拿到的都是向屏幕打印的文字内容。 我没有一步? 我是否需要在“组合”档案中增加一些配置?

最佳回答

配置了Apachen t,承认某些档案类型是可执行的。 在您的网页上添加这一条。 组合将发挥trick的作用,尽管还有其他许多方法将这一 the合起来,以实现同样的效果:

AddHandler cgi-script .cgi .pl

贵领域备选办法清单中还可加上<代码>ExecCGI。 See Apache Tutorial: Content with CGI for more information.

问题回答

暂无回答




相关问题
Why does my chdir to a filehandle not work in Perl?

When I try a "chdir" with a filehandle as argument, "chdir" returns 0 and a pwd returns still the same directory. Should that be so? I tried this, because in the documentation to chdir I found: "...

How do I use GetOptions to get the default argument?

I ve read the doc for GetOptions but I can t seem to find what I need... (maybe I am blind) What I want to do is to parse command line like this myperlscript.pl -mode [sth] [inputfile] I can use ...

Object-Oriented Perl constructor syntax and named parameters

I m a little confused about what is going on in Perl constructors. I found these two examples perldoc perlbot. package Foo; #In Perl, the constructor is just a subroutine called new. sub new { #I ...

Where can I find object-oriented Perl tutorials? [closed]

A Google search yields a number of results - but which ones are the best? The Perl site appears to contain two - perlboot and perltoot. I m reading these now, but what else is out there? Note: I ve ...

热门标签