Re: Where do the warn message go? (Ap2 MP2 on Win32)
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 htmlbodyI 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
Re: Where do the warn message go? (Ap2 MP2 on Win32)
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 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 TransferLog logs/access.log ErrorLog logs/error.log TypesConfig conf/mime.types LogLevel debug # and here's the script (/perl/warning.pl): # warn Hello You Script\n; use strict; print Content-Type: text/html\n\n; print htmlbodyI think I issued a warning/html/body; # There's really nothing more. Lionel. - Original Message - From: Malcolm J Harwood [EMAIL PROTECTED] To: modperl@perl.apache.org Cc: Lionel MARTIN [EMAIL PROTECTED] Sent: Thursday, May 11, 2006 7:52 AM Subject: Re: Where do the warn message go? (Ap2 MP2 on Win32) On Thursday 11 May 2006 01:40 am, Lionel MARTIN wrote: I tried to put a LogLevel debug in my httpd.conf, so that everything gets logged, but this didn't make a difference: my warn messages don't get logged. What else could I try, in order to find out why? Are your logs going through syslog, or directly to file? If it's through syslog that could be filtering for you. Do you have a signal handler for warn installed at all? It's possible that's eating your warns. What modules do you have loaded? (I've seen odd cases with some modules causing warns to get eaten). Have you tried reducing your script to just the warn statement? What happens under ModPerl::PerlRun as opposed to ModPerl::Registry? -- To know and yet think we do not know is the highest attainment. Not to know and yet think we do know is a disease. - Lao-tzu
Re: Where do the warn message go? (Ap2 MP2 on Win32)
Hi, I tried to put a LogLevel debug in my httpd.conf, so that everything gets logged, but this didn't make a difference: my warn messages don't get logged. What else could I try, in order to find out why? If I'm running a script with that: warn warning\n; die dying\n; Then, waning doesn't get logged while dying does... - Original Message - From: Malcolm J Harwood [EMAIL PROTECTED] To: modperl@perl.apache.org Cc: Lionel MARTIN [EMAIL PROTECTED] Sent: Tuesday, May 09, 2006 3:53 PM Subject: Re: Where do the warn message go? (Ap2 MP2 on Win32) On Thursday 04 May 2006 06:37 am, Lionel MARTIN wrote: I'm sorry, but I may have misled you: I said script, but I'm not talking about CGI scripts here. In fact, even when puttting my warn $msg; in a custom MP handler, the message doesn't go to the error log. So, I'd like to understand when the content of the warn message is going. (please have a look at the details below for the original question) Did you check your apache logging settings? If LogLevel isn't set appropriately, apache might be discarding the warns. - Original Message - I'm currently running Apache 2.0.54 with MP 2.0.2, on Win32. When I'm doing a print STDERR Hello\n; warn Hello\n; at server startup, i.e.in a Perl block in httpd.cong, both messages go to the console, and to error.log as well. But when I'm doing the same thing within a script (handleed by ModPerl::Registry), these message don't appear anywhere. So, I'm wondering where they get redirected? The fact I'm running that under Win32 (threaded MPMs) may be important? -- Anywhere is walking distance, if you've got the time. - Steven Wright
Re: Where do the warn message go? (Ap2 MP2 on Win32)
On Thursday 11 May 2006 01:40 am, Lionel MARTIN wrote: I tried to put a LogLevel debug in my httpd.conf, so that everything gets logged, but this didn't make a difference: my warn messages don't get logged. What else could I try, in order to find out why? Are your logs going through syslog, or directly to file? If it's through syslog that could be filtering for you. Do you have a signal handler for warn installed at all? It's possible that's eating your warns. What modules do you have loaded? (I've seen odd cases with some modules causing warns to get eaten). Have you tried reducing your script to just the warn statement? What happens under ModPerl::PerlRun as opposed to ModPerl::Registry? -- To know and yet think we do not know is the highest attainment. Not to know and yet think we do know is a disease. - Lao-tzu
Re: Where do the warn message go? (Ap2 MP2 on Win32)
On Thursday 04 May 2006 06:37 am, Lionel MARTIN wrote: I'm sorry, but I may have misled you: I said script, but I'm not talking about CGI scripts here. In fact, even when puttting my warn $msg; in a custom MP handler, the message doesn't go to the error log. So, I'd like to understand when the content of the warn message is going. (please have a look at the details below for the original question) Did you check your apache logging settings? If LogLevel isn't set appropriately, apache might be discarding the warns. - Original Message - I'm currently running Apache 2.0.54 with MP 2.0.2, on Win32. When I'm doing a print STDERR Hello\n; warn Hello\n; at server startup, i.e.in a Perl block in httpd.cong, both messages go to the console, and to error.log as well. But when I'm doing the same thing within a script (handleed by ModPerl::Registry), these message don't appear anywhere. So, I'm wondering where they get redirected? The fact I'm running that under Win32 (threaded MPMs) may be important? -- Anywhere is walking distance, if you've got the time. - Steven Wright
Where do the warn message go? (Ap2 MP2 on Win32)
Hi, I'm currently running Apache 2.0.54 with MP 2.0.2, on Win32. When I'm doing a print STDERR "Hello\n";warn "Hello\n"; at server startup, i.e.in a Perl block in httpd.cong, both messages go to the console, and to error.log as well. But when I'm doing the same thing within a script (handleed by ModPerl::Registry), these message don't appear anywhere. So, I'm wondering where they get redirected? The fact I'm running that under Win32 (threaded MPMs) may be important? Thanks, Lionel.
Re: Where do the warn message go? (Ap2 MP2 on Win32)
Lionel MARTIN wrote: Hi, I'm currently running Apache 2.0.54 with MP 2.0.2, on Win32. When I'm doing a print STDERR Hello\n; warn Hello\n; at server startup, i.e.in a Perl block in httpd.cong, both messages go to the console, and to error.log as well. But when I'm doing the same thing within a script (handleed by ModPerl::Registry), these message don't appear anywhere. So, I'm wondering where they get redirected? The fact I'm running that under Win32 (threaded MPMs) may be important? http://httpd.apache.org/docs/2.0/mod/mod_cgi.html#scriptlog Bill
Re: Where do the warn message go? (Ap2 MP2 on Win32)
Thanks, I'm sorry, but I may have misled you: I said script, but I'm not talking about CGI scripts here. In fact, even when puttting my warn $msg; in a custom MP handler, the message doesn't go to the error log. So, I'd like to understand when the content of the warn message is going. (please have a look at the details below for the original question) - Original Message - From: William A. Rowe, Jr. [EMAIL PROTECTED] To: Lionel MARTIN [EMAIL PROTECTED] Cc: modperl@perl.apache.org Sent: Thursday, May 04, 2006 12:28 PM Subject: Re: Where do the warn message go? (Ap2 MP2 on Win32) Lionel MARTIN wrote: Hi, I'm currently running Apache 2.0.54 with MP 2.0.2, on Win32. When I'm doing a print STDERR Hello\n; warn Hello\n; at server startup, i.e.in a Perl block in httpd.cong, both messages go to the console, and to error.log as well. But when I'm doing the same thing within a script (handleed by ModPerl::Registry), these message don't appear anywhere. So, I'm wondering where they get redirected? The fact I'm running that under Win32 (threaded MPMs) may be important? http://httpd.apache.org/docs/2.0/mod/mod_cgi.html#scriptlog Bill