Mads Toftum wrote:
> On Thu, Aug 03, 2000 at 02:01:02PM +0100, Steve Hay wrote:
> >
> > Perhaps the Apache Service doesn't pick up the STDOUT from the program
> > properly?
>
> That would be my second guess. It shouldn't be too hard to debug if
> you've got a compiler nearby. In the file ssl_engine_pphrase.c
> look for " * Filter program" - you could just change that block
> to log some of all the variables available - the ssl_log function
> would be an easy way.
I've put some calls to ssl_log() into ssl_util_readfilter() (which is called from the
code in ssl_engine_pphrase.c) as
follows:
char *ssl_util_readfilter(server_rec *s, pool *p, char *cmd)
{
static char buf[MAX_STRING_LEN];
FILE *fp;
char c;
int k;
ssl_log(s, SSL_LOG_INFO,
"Init: Opening pipe to command...");
if ((fp = ssl_util_ppopen(s, p, cmd)) == NULL)
return NULL;
ssl_log(s, SSL_LOG_INFO,
"Init: OK - fileno is: %d", fileno(fp));
ssl_log(s, SSL_LOG_INFO,
"Init: Reading upto %d characters from pipe...",
MAX_STRING_LEN-1);
for (k = 0; read(fileno(fp), &c, 1) == 1
&& (k < MAX_STRING_LEN-1) ; ) {
ssl_log(s, SSL_LOG_INFO,
"Init: Read character with ASCII value %d", c);
if (c == '\n' || c == '\r')
break;
buf[k++] = c;
}
buf[k] = NUL;
ssl_util_ppclose(s, p, fp);
ssl_log(s, SSL_LOG_INFO,
"Init: Closed pipe");
ssl_log(s, SSL_LOG_INFO,
"Init: Read %d characters: %s", k, buf);
return buf;
}
I then re-compiled everything and tried to start apache (1) as a console app, and (2)
as a service.
The console app started successfully and output the following into my ssl_error.log
file:
Init: Opening pipe to command...
Init: OK - fileno is: 5
Init: Reading upto 8191 characters from pipe...
Init: Read character with ASCII value 110
Init: Read character with ASCII value 116
Init: Read character with ASCII value 112
Init: Read character with ASCII value 99
Init: Read character with ASCII value 57
Init: Read character with ASCII value 57
Init: Read character with ASCII value 13
Init: Closed pipe
Init: Read 6 characters: ntpc99
The service failed as before and output the following to the log file:
Init: Opening pipe to command...
Init: OK - fileno is: 5
Init: Reading upto 8191 characters from pipe...
Init: Closed pipe
Init: Read 0 characters:
This can only mean that the read(...) in ssl_util_readfilter() above is failing.
Any ideas why, anyone?
> I just looked a bit back in the cvs logs ... diffs between version
> 1.30 and 1.31 of that file has a small change to handle a path
> with ' ' differently - does your path contain a space?
I think that 1.3.12 / 2.6.5 already contains the fix for a space in the filename, but
my path doesn't contain a space anyway.
I specify "conf/ppfilter.exe" to mean "D:\apache\conf\ppfilter.exe"; specifying this
explicitly instead makes no difference.
Thanks,
Steve Hay
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]