in reply to Re: mod_perl questions
in thread mod_perl questions

> Single process mode is usually started by calling httpd with a -X parameter

This I know, but on Windows apache is controlled as service. Any idea how to tell the service to run a single mode?

> If you don't see warn output in the error_log, it's either not getting to your warn statement
package Apache2::Hello; use strict; use warnings; use Apache2::RequestRec(); # for $r->content_type use Apache2::RequestIO(); # for $r->puts use Apache2::Const qw/:common/; use Apache2::Reload; sub handler { my $r = shift; my $time = scalar localtime(); my $package = __PACKAGE__; $r->content_type('text/html'); warn 'darn'; $r->puts(<<"END"); <HTML><BODY> <H3>Hello</H3> Hello from <B>$package</B>! The time is $time. </BODY></HTML> END return Apache2::Const::OK; } 1;
You think?

> or you're looking in the wrong error_log

There is only one I know. Configured by ErrorLog parameter in httpd.conf
Besides, die messages go there as they should.

Thanks,
Artem.

Replies are listed 'Best First'.
Re^3: mod_perl questions
by perrin (Chancellor) on Mar 30, 2007 at 13:01 UTC
    Have you confirmed that the handler code you showed is getting run? Is there any chance you have more than one apache installed on your system? Another possibility is that you might have changed the LogLevel setting from its default.

    I can't help you with the Windows service question since I don't use Windows. I'd suggest you check the docs that came with your build or ask on the mod_perl list. Randy Kobes is pretty good about helping out Windows users on the list.

      > Have you confirmed that the handler code you showed is getting run?

      Yes

      Is there any chance you have more than one apache installed on your system?

      Nope.

      Another possibility is that you might have changed the LogLevel setting from its default.

      I tried defferent ones.

      > I'd suggest you check the docs that came with your build or ask on the mod_perl list.

      Damn. I should have thought about it on my own. Thanx ;)

      One more thing. It really pisses off: when there is a syntax error, apache says 'Can't load module...' but does not mention the reason at all. So it becomes a complicated quest to correct such issues.

      Thanx,
      Artem.
        If it's not one of those things, I don't know why warn isn't working for you. It works on every mod_perl I've compiled.

        I load my modules during startup from a startup.pl called from httpd.conf. I seem to get the full error messages when they don't compile.