Dennis, when you run it from the command line what is the output using both
methods?  It could be that part of the extra output provided by debug
provides enough "header" information for the web server in question.  By the
way, what web server are you using and what version?

Don

-----Original Message-----
From: dennis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 16, 2006 11:09 AM
To: perl-ldap@perl.org
Subject: Have to use DEBUG 1 to make Net::LDAPS work??


I have a password reset app written in perl; it uses CGI.pm and Net::LDAP
with %args and settings for talking to Sun ONE LDAP over SSL.

When I set debug => '1' in %args, he binds ok, performs search, finds entry,
modifies password, and displays the appropriate next page -- albeit with
lots of debug messages. But when I set debug => '0', the bind works but
remaining ops fail, and I get Server Error (see error log)

#------------ web server log --------------------------------------
[16/May/2006:11:37:25] failure ( 6822): for host 20.6.25.155 trying to POST
/password/usd-cgi/reset.cgi, cgi_scan_headers reports: HTTP4044: the CGI
program /opt/CAusd/webserver/password/cgi-bin/reset.cgi did not produce a
valid header (program terminated without a valid CGI header.
#------------------------------------------------------------------
Has anyone seen this problem? Know of a fix? I've put connection code at
end. 
If anyone would like to see fuller code, I put link on web site:
www.ideastream.com/net_ldap/reset.txt

/dennis

sub lookup_user {
<snip>
  my %args = (
               port => 636,
               verify => 'require',
               cafile => '/opt/CAusd/util/password/certs/cacert.pem',
               sslversion => 'sslv3',
               #debug => '0',
             );

  my $ldap = Net::LDAP->new("ldaps://$the->{ldaphost}", %args ) or die "$@";




Reply via email to