Hi,

Thanks for trying to help me.

Replying each of your questions...

----- Original Message ----- From: "Malcolm J Harwood" <[EMAIL PROTECTED]>
To: <modperl@perl.apache.org>
Cc: "Lionel MARTIN" <[EMAIL PROTECTED]>
Sent: Thursday, May 18, 2006 3:41 PM
Subject: Re: Where do the "warn" message go? (Ap2 & MP2 on Win32)


On Thursday 11 May 2006 02:00 am, Lionel MARTIN wrote:
Hi,

I'v really tried to reduce everything to a minimum to insulate the problem.

So, here's the config file:

#####
ServerName MYSERVER
ServerRoot "C:\Program Files\Apache
Group\Apache2\TestingFromScratch\ApacheModPerl"

On the offchance, try taking the space out of the filename.

DocumentRoot "htdocs"
Listen 80

LoadModule mime_module ../../modules/mod_mime.so
LoadModule log_config_module ../../modules/mod_log_config.so

# for mod_perl
LoadFile "c:/TempApache/Perl/bin/perl58.dll"
LoadModule perl_module ../../modules/mod_perl.so

<Location /perl/>
 SetHandler perl-script
 PerlResponseHandler ModPerl::Registry
 PerlOptions +ParseHeaders
</Location>

What happens if you change that to ModPerl::PerlRun?

This could have been the issue, as PerlRun is not setting the environments variables, but I tried, and this is still not working.


TransferLog logs/access.log
ErrorLog logs/error.log
TypesConfig conf/mime.types
LogLevel debug
#####

you get an appropriate entry in the access log?

Yes.


and here's the script (/perl/warning.pl):

#####
warn "Hello You Script\n";
use strict;
print "Content-Type: text/html\n\n";
print "<html><body>I think I issued a warning</html></body>";
#####

Does it make any difference if you move the warn to the end (it shouldn't)?

No.

Does anything different happen if you access the page more than once? If you
shut down the server afterwards?

Things I tried many times. No.


What happens if you run in single process mode?

Here, I'm not sure to understand what you mean. Under Windows, Apache is running in a threaded MPM, which means there are always 2 distinct processes: the parent process, and the unique child process, containing the many different threads replying the requests.


I don't know the windows side of things, so I don't know if that makes any
difference. I'm not seeing anything wrong with your config. On unix I'd look for permissions problems. Does apache run as a seperate user or with changed
permissions after startup?

In fact, I'm really surprised that my warn messages are not working, while I stripped down my configuration to a minimum level.

Interestingly, if I'm doing:
<Perl>
print STDERR "test1\n";
warn "test2\n";
</Perl>
in httpd.conf, both test1 and test2 messages go to shell and to error.log as well.

Is there any Perl variables I could be checking to understand a bit more the reasons of my warn messages not working?

Thanks,

Lionel.







--
"But life has to be more than just a pulse-beat.
What we hold sacred gives our lives meaning."
Sinclair in Babylon 5: Believers

Reply via email to