You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by lu...@chipcity.com.au on 2005/09/26 02:42:47 UTC
is apache using modperl?
Hi.
I've got the following script, which I picked up off the apache mod_perl pages,
running.
/~~~~~~~~~~~~~~~~~~~
#!/usr/bin/perl
# Script: vegetables1.pl
use CGI::Pretty ':standard';
print header,
start_html('Vegetables'),
h1('Eat Your Vegetables'),
ol(
li('peas'),
li('peppers'),
li('red'),
li('green')
),
hr,
end_html;
\___________________
How can I be sure that is being run by mod_perl and not by perl?
Thanks.
Kind regards.
Luke.
--
............._..
.| .| |.|/.|_ .
.|__.|_|.|\.|_ .
:61 421 276 282:
Re: is apache using modperl?
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
>>
>>>>How can I be sure that is being run by mod_perl and not by perl?
>>
>>http://perl.apache.org/docs/1.0/guide/install.html#How_can_I_tell_whether_mod_perl_is_running_
>
>
> httpd -l doesn't show mod_perl.
> As I understand it: httpd -l only shows the statically linked modules.
> I obviously use mod_perl as a DSO.
that's only one of several ways mentioned in that document. keep reading.
> I have renamed my perl binary.
if you insist.
> My scripts work from apache.
> If I run them from the command line they don't.
>
> Is it safe to assume that mod_perl is working?
the only way to be sure is to use the advice listed in that document, each
of which is a good exercise in itself anyway if you're using mod_perl.
--Geoff
Re: is apache using modperl?
Posted by Boysenberry Payne <bo...@humaniteque.com>.
I usually test for $ENV{MOD_PERL} or $ENV{MOD_PERL_API_VERSION}
Thanks,
Boysenberry
boysenberrys.com | habitatlife.com | selfgnosis.com
On Sep 27, 2005, at 1:51 AM, luke@chipcity.com.au wrote:
> Hi.
>
> 26Sep2005 @ 09:40 Geoffrey Young thusly spake
>>
>>
>> Alexander Charbonnet wrote:
>>> Rename your Perl binary and see if it still works. :-)
>>
>> egads, no.
>>
>>>> How can I be sure that is being run by mod_perl and not by perl?
>>
>> http://perl.apache.org/docs/1.0/guide/
>> install.html#How_can_I_tell_whether_mod_perl_is_running_
>
> httpd -l doesn't show mod_perl.
> As I understand it: httpd -l only shows the statically linked modules.
> I obviously use mod_perl as a DSO.
>
> -------
>
> I have renamed my perl binary.
> My scripts work from apache.
> If I run them from the command line they don't.
>
> Is it safe to assume that mod_perl is working?
>
>
>>
>> --Geoff
>
> --
> ............._..
> .| .| |.|/.|_ .
> .|__.|_|.|\.|_ .
> :61 421 276 282:
>
>
Re: is apache using modperl?
Posted by lu...@chipcity.com.au.
Hi.
26Sep2005 @ 09:40 Geoffrey Young thusly spake
>
>
> Alexander Charbonnet wrote:
> > Rename your Perl binary and see if it still works. :-)
>
> egads, no.
>
> >>How can I be sure that is being run by mod_perl and not by perl?
>
> http://perl.apache.org/docs/1.0/guide/install.html#How_can_I_tell_whether_mod_perl_is_running_
httpd -l doesn't show mod_perl.
As I understand it: httpd -l only shows the statically linked modules.
I obviously use mod_perl as a DSO.
-------
I have renamed my perl binary.
My scripts work from apache.
If I run them from the command line they don't.
Is it safe to assume that mod_perl is working?
>
> --Geoff
--
............._..
.| .| |.|/.|_ .
.|__.|_|.|\.|_ .
:61 421 276 282:
Re: is apache using modperl?
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Alexander Charbonnet wrote:
> Rename your Perl binary and see if it still works. :-)
egads, no.
>>How can I be sure that is being run by mod_perl and not by perl?
http://perl.apache.org/docs/1.0/guide/install.html#How_can_I_tell_whether_mod_perl_is_running_
--Geoff
Re: is apache using modperl?
Posted by Alexander Charbonnet <al...@charbonnet.com>.
Rename your Perl binary and see if it still works. :-)
On Sunday 25 September 2005 07:42 pm, luke@chipcity.com.au wrote:
> Hi.
>
> I've got the following script, which I picked up off the apache mod_perl
> pages, running.
>
> /~~~~~~~~~~~~~~~~~~~
> #!/usr/bin/perl
>
> # Script: vegetables1.pl
> use CGI::Pretty ':standard';
> print header,
> start_html('Vegetables'),
> h1('Eat Your Vegetables'),
> ol(
> li('peas'),
> li('peppers'),
> li('red'),
> li('green')
> ),
> hr,
> end_html;
> \___________________
>
> How can I be sure that is being run by mod_perl and not by perl?
>
> Thanks.
> Kind regards.
> Luke.