Debian 3.1 Sarge upgrade broke all CGIs?
Posted by: dansanderson
Posted on: 2005-10-14 17:27:00
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:
- - -
#!/usr/bin/perl
use warnings;
use strict;
print "Content-Type: text/htmlnn<html><body>";
print 'Hello! '.localtime();
print "</body></html>n";
exit(0);
- - -
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?