Yes, I just made a duplicate: index2a.cgi
then I changed the shebang to this:
#!/usr/bin/perl -a
to
#!/usr/bin/perl
so just removed the -a now I get an 500 error on the webscript but not from shell, and the error log has this:
Premature end of script headers
however, it does not have that if I put either -a or -w after the shebang line.
so I do not know why that would happen. I never print anything without first printing:
print header(-charset=>"UTF-8");
except if I am printing to a file:
open(FILE,">/path/to/file") or die "could not open file: $!";
print FILE qq~Hello this is just a test to see if it works.~;
close(FILE);
I do that for debugging sometimes.
The config file I use is a file called: vars.conf and it just has a bunch of subroutines in it that are standard and a bunch of code that is standard.
I call it by using require.
That file was over 7k lines long so I broke it down into two:
vars.conf and varsEsubs.conf which vars.conf calls the other using require. Only did that because when I first did that file I was on a slow internet so while I uploaded the file it took a while and since we were always live I was always worried someone on the site would get a software error from the file not being available while it was being over-wrote. So I broke it down into smaller files.
Anyhow, It is very odd that if the -w or -a is in the shebang then there is no error in the browser.
I guess I'll duplicate everything then start playing with it to see if I can find the problem.
Thanks for any more help you can be and for the help you've already been.
Mack