All of my CGIs are broken after the Sarge upgrade.
I’ve seen a couple of other threads about certain apps breaking with the Sarge upgrade (e.g. Movable Type), with some insinuation that file permissions need to be changed to work with the new set-up. But even a freshly created test CGI script seems to fail, and permissions do not appear to be the issue.
A simple test.cgi:
print “Content-Type: text/html\n\n”;
print 'Hello! '.localtime();
chmod 755 test.cgi
Runs fine from the command line (as me). Returns 500 error in a browser, and leaves only “Premature end of script headers” in the error log. Changing permissions to 777 does not fix the problem. These files are owned by me, with a group of “pg” followed by a bunch of numbers.
A similar script written for /bin/sh fails in the same way. This feels more like an Apache config issue than a file permissions issue. PHP appears unaffected.
Has anyone else fixed this problem for sure with their own apps? How, exactly?