You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Morten-Christian Bernson <ap...@mortencb.cx> on 2003/09/28 22:38:46 UTC
[users@httpd] Problem with CGI-bin scripts
I have a very strange problem that I hope someone can help me with.
I am managing a pretty new server with FreeBSD on. It has Apache
1.3.28 with PHP 4.2.3 installed, and everything is good except for
CGI-bin scripts.
After Apache is started (or restarted) cgi-bin scripts won't work.
Mailman, Bugzilla, test.cgi (echo's out hello world)... whatever is
run via CGI-BIN just produces a 500 internal server error with
"Premature end of script headers..." in the error-log. After a while
(up to 30 minutes) it suddenly works. Without anyone touching
anything. I have to mention that the lines about cgi-bin in the
config file are the same as on another server, where it works fine.
Permissions on the dir and files are ok, and the script works as it
should from the shell, run as the user apache runs as.
But even if when works, it won't work with cookies. Both mailman and
bugzilla doesn't even try to set cookies, so no one can log in.
I have looked and looked and looked, and can't figure out why this
happens. It's just so strange. I have had other's who manage FreeBSD
full-time look at it, and they think it's just as strange as me.
I am at a loss, and really hope someone can come up with good ideas as
to how to solve this.
If I should produce any logs, info or whatever, just tell me. I would
do almost anything to get this to work since a lot of people are
anxious to get to use Mailman and Bugzilla on this server.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Problem with CGI-bin scripts
Posted by Joshua Slive <jo...@slive.ca>.
On Sun, 28 Sep 2003, Morten-Christian Bernson wrote:
> I have a very strange problem that I hope someone can help me with.
Yes, strange. I don't think I've ever heard of any problem where cgi
scripts don't work initially and then start working later.
> But even if when works, it won't work with cookies. Both mailman and
> bugzilla doesn't even try to set cookies, so no one can log in.
That's also strange. Apache doesn't do anything fancy with cookies. They
are simply another HTTP response header.
> If I should produce any logs, info or whatever, just tell me. I would
> do almost anything to get this to work since a lot of people are
> anxious to get to use Mailman and Bugzilla on this server.
Have you tried writing a trivial cgi script and see if that works:
#!/bin/sh
echo Content-type: text/html
echo
echo Hi world.
Have you tried using the ScriptLog directive (see the mod_cgi docs)?
Are you sure you don't have any type of firewall or proxy server that
could be interfering?
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org