in reply to Re^2: Premature end of script headers
in thread Premature end of script headers

-c doesn't run the script, it just compiles it. Try running it without the option and check the output as described in the previous post.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^4: Premature end of script headers
by gszabo (Novice) on Sep 30, 2015 at 10:54 UTC
    perl -d -T /var/www/gestioip/install/index.cgi

    Loading DB routines from perl5db.pl version 1.33
    Editor support available.

    main::(/var/www/gestioip/install/index.cgi:27):
    27: my $lang;

    But.... I try to put a test.cgi script in www dir with this :

    #!/bin/sh
    echo "Content-type: text/plain"
    echo
    set

    It generates the same error in error.log
      It generates the same error in error.log

      Well done. You have successfully proven that the problem is not related to perl in any way.

Re^4: Premature end of script headers
by gszabo (Novice) on Sep 30, 2015 at 10:48 UTC
    perl -d -T /var/www/gestioip/install/index.cgi

    Loading DB routines from perl5db.pl version 1.33
    Editor support available.

    Enter h or `h h' for help, or `man perldebug' for more help.

    main::(/var/www/gestioip/install/index.cgi:27):
    27: my $lang;

    But...
    try to put a test.cgi script in www dir with this :

    #!/bin/sh
    echo "Content-type: text/plain"
    echo
    set

    It generates the same error in apache error.log
      Don't use -d unless you want to debug your script in the debugger.
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ