httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] executing php in Apache
Date Wed, 25 Feb 2004 17:13:31 GMT
> -----Original Message-----
> From: Chuck Ouellette []
> While on the subject, what does mod_perl do? I have been running Perl
> 5.8 with many CGI scripts written in perl and have been working just
> fine without me compiling in mod_perl or using it as a DSO. Can anyone
> tell me the benefits/gotcha's to mod_perl and the real purpose of it?

When apache executes a "standard" CGI in perl, it first encounters the
shebang line (#!/usr/bin/perl). This causes it to load an instance of
the perl interpreter into the shell that's forked to run the CGI. Then
it runs the CGI. Then the shell exits. The next time that CGI is hit,
apache rumbles through the same rigmarole again.

That's obviously a bit inefficient. mod_perl allows you to load an
instance of perl into httpd at runtime and for it to persist for the
life of that daemon. So any perl code is executed by the in-memory
interpreter. Thats a lot faster and also allows you to take advantage of
persistence of data. At the risk of getting a bollocking, you might like
to look at for more details...

Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

> Thanks,
> Chuck 
> -----Original Message-----
> From: Charlie Smith [] 
> Sent: Wednesday, February 25, 2004 11:30 AM
> To:
> Subject: Re: [users@httpd] executing php in Apache
> Used to be that the page had a disclaimer that it does not
> run with
> Apache 2.0
> Yup, it's still there at
> It says:
> Warning 
> Do not use Apache 2.0 and PHP in a production environment neither on
> Unix nor
> on Windows. 
> Even though this indicates you shouldn't run this way, I believe there
> are
> those that are.   
> Here's a reference on building mod_php and mod_perl for apache 1.3 -
> would
> probably work for apache 2?:

You might also try using the DSO approach and apply the section "Build
as a DSO outside the Apache Source Tree via APXS" to mod_php.   

BTW: The php install is part of the standard installation procedure.
install php from the standard install as part of the apache build.

>>> Somraj.Bhattacharyya wrote 2/25/2004 5:27:14 AM >>>

Can anyone guide me on how to setup Apache 2 to support php files

Thanks in advance

Diese E-mail ist eine private und persönliche Kommunikation. Sie hat
keinen Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This
e-mail is of a private and personal nature. It is not related to the
exchange or business activities of the SWX Group. Le présent e-mail est
un message privé et personnel, sans rapport avec l'activité boursière du
Groupe SWX.

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message