perl - "End of script output before headers" error in Apache -


apache on windows gives me following error when try access perl script:

server error!  server encountered internal error , unable complete request.  error message:  end of script output before headers: sample.pl  if think server error, please contact webmaster.  error 500  localhost apache/2.4.4 (win32) openssl/1.0.1e php/5.5.3 

this sample script

#!"c:\xampp\perl\bin\perl.exe" print "hello world"; 

but not working on browser

if cgi script web, must output header:

#!"c:\xampp\perl\bin\perl.exe"  print "content-type: text/html\n\n"; print "hello world"; 

the following error message tells end of script output before headers: sample.pl

or better, use cgi module output header:

#!"c:\xampp\perl\bin\perl.exe"  use strict; use warnings;  use cgi;  print cgi::header(); print "hello world"; 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -