Search code examples
perlazurefastcgi

FastCgiModule error 500 with Azure


I am trying to run a Perl Fast CGI process in Azure. I have built a hello world test page (test.pl) and if I run it from the command it works

d:\home\site\wwwroot\bin\perl\bin\perl.exe -MFCGI::IIS=do test.pl

I have a handler for *.pl to run d:\home\site\wwwroot\bin\perl\bin\perl.exe (Strawbery Perl) with the arguments -MFCGI::IIS=do (i.e. the same as the above).

I get a 500 error. When I view the detailed log the only information I get back is FastCgiModule Error Code 0x8007000d.

My file runs from the command line but it won't run within the web app. Why not?


Solution

  • The problem was simple. My perl hello world worked from the command line, but for a web page it obviously needs to set the content type. I was missing the first line!

    print "Content-type: text/html", "\n\n";
    print "Hello World.\n";