End of script output before headers: hello.pl

Update: 07/12/13

The script runs through the command line.

"------ additional line" - show the extra key path in the editor.


XAMPP: 1.8.2

Server: Apache 2.4

Question:

I keep getting the error "End of script output before headers: hello.pl" for the simple hello world perl script. I am trying to execute a script through the web server "xampp".

Curious note:

I can use another Perl script that will work initially. However, when I make simple changes, such as a space, a return, or a "#" comment, the script will no longer function. However, if I remove the change and save it, the script will work again.

Checklist

perl (. ). script ( , ) httpd.config ftp ASCII

Perl Script:

#!"C:\xampp\perl\bin\perl.exe"

print "Content-Type: text/html\n\n";

print "hello world";

------extra line

httpd.config

<Directory "C:/xampp/htdocs">;
 Options Indexes FollowSymLinks Includes ExecCGI
 AllowOverride All
 Require all granted
</Directory>;

+1
4

, .

CGI HTTP.., two\n , HTML ( Perl CGI- Windows?)

, (, ++).

, shebang (#!) .

+1

Perhaps this is a known PHP error ( https://bugs.php.net/bug.php?id=66474 ). Try different versions of PHP?

0
source

These are probably SELinux blocks. try it

setsebool -P httpd_enable_cgi 1 
chcon -R -t httpd_sys_script_exec_t cgi-bin/your_script.cgi
-1
source

All Articles