httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terence Burnard <>
Subject Re: [users@httpd] CGI wont read STDIN/POST
Date Thu, 29 Sep 2005 13:50:15 GMT
> On 9/27/05, Terence Burnard <> wrote:
>>I have been working for a while trying to get Nagios working with
>>apache.  This is the .htaccess configuration for the directory that the
>>cgis are in:
>>AuthName "Nagios Access"
>>AuthType Basic
>>#AuthScriptURI "/htlogin/ldap.php?filter=nagios"
>>require valid-user
>>AuthUserFile /home/nagios/nagios.users
>>Now if you notice, the AuthScriptURI is commented out. This is the the
>>configuration that works.
>>If I uncomment AuthScriptURI and comment out AuthUserFile, my browser
>>locks up on this line in the cgi:
>>      if(!fread(cgiinput,content_length,1,stdin)){
>>The cgi can retrieve CONTENT_LENGTH and CONTENT_TYPE from the environment.
>>Now the question I have is:
>>What configuration would prevent the cgi script from reading the POST
>>variables on STDIN when the script works fine with AuthUserFile but
>>hangs on a 'fread' with AuthScriptURI?
>>The ldap.php script works properly on GET requests, but as mentioned
>>hangs on POST.
> I had to google to figure out what the heck AuthScriptURI is.  It
> belongs to mod_auth_script, which I have never seen before.
> I think your solution is going to be to use a different auth module. 
> There are apache modules that allow you to auth directly against ldap
> rather than going through a php script.
> If I had to guess what was happening, I would say that php is sucking
> up the post contents, because it does not know that it is being called
> as an auth handler and not as a content handler.  I doubt that is
> fixable.
> Joshua.

Thanks for the lead, it helped me fix the problem.  It turned out to be 
mod_auth_script(1.03), all I did was upgrade it to 1.10 and everything 
is working great.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message