Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

Can Apache 2 run mod_perl then php?

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


blaine at worldweb

Nov 15, 2007, 10:14 AM

Post #1 of 5 (163 views)
Permalink
Can Apache 2 run mod_perl then php?

Hi,

I think I might of read something somewhere that indicated that
Apache 2 could run multiple application layers before displaying
content. However, I can not find this again, and any information
would be helpful.

Does anyone know if it's possible to have

1) Apache run mod perl (obviously it can)
2) Then take the mod_perl resulting page and parse it using PHP
3) Display the output

Thanks,
Blaine


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe[at]httpd.apache.org
" from the digest: users-digest-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: users-help[at]httpd.apache.org


michaelm at swplumb

Nov 15, 2007, 10:16 AM

Post #2 of 5 (154 views)
Permalink
Re: Can Apache 2 run mod_perl then php? [In reply to]

Not sure but why not just have PHP run a Perl script? If you really want
Perl to generate your PHP then you could have it create a temp file,
return the temp file to PHP, include the temp file, and then remove the
temp file when done.
> Hi,
>
> I think I might of read something somewhere that indicated that Apache
> 2 could run multiple application layers before displaying content.
> However, I can not find this again, and any information would be helpful.
>
> Does anyone know if it's possible to have
>
> 1) Apache run mod perl (obviously it can)
> 2) Then take the mod_perl resulting page and parse it using PHP
> 3) Display the output
>
> Thanks,
> Blaine


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe[at]httpd.apache.org
" from the digest: users-digest-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: users-help[at]httpd.apache.org


margol at beamartyr

Nov 15, 2007, 10:29 AM

Post #3 of 5 (154 views)
Permalink
Re: Can Apache 2 run mod_perl then php? [In reply to]

I know it should be possible. I've never actually done it but I know
the theory and can try to point you in the right direction...

You'd want to compile mod_php as a filter, not a handler, and have
mod_perl run as a response handler. In addition, you'd want to
SetOutputFilter PHP for the request and possible have mod_perl set the
content-type to application/x-httpd-php

Give that a try and see if it does what you want.

Issac

Blaine Everingham wrote:
> Hi,
>
> I think I might of read something somewhere that indicated that Apache
> 2 could run multiple application layers before displaying content.
> However, I can not find this again, and any information would be helpful.
>
> Does anyone know if it's possible to have
>
> 1) Apache run mod perl (obviously it can)
> 2) Then take the mod_perl resulting page and parse it using PHP
> 3) Display the output
>
> Thanks,
> Blaine
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe[at]httpd.apache.org
> " from the digest: users-digest-unsubscribe[at]httpd.apache.org
> For additional commands, e-mail: users-help[at]httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe[at]httpd.apache.org
" from the digest: users-digest-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: users-help[at]httpd.apache.org


blaine at worldweb

Nov 16, 2007, 10:07 AM

Post #4 of 5 (146 views)
Permalink
Re: Can Apache 2 run mod_perl then php? [In reply to]

I'm still having an issue tying to get this running. Below is what I
have so far, however I believe that the output filter of x-httpd-php
is wrong. I'm not sure where I would find the compiled filter name
for this. Does anyone know?


<Directory "/www/test">
Options -Indexes FollowSymLinks

## Set perl to handle the request
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
Order allow,deny
Allow from all

AddOutputFilter x-httpd-php html

</Directory>


At 11:29 AM 15/11/2007, you wrote:
>I know it should be possible. I've never actually done it but I know
>the theory and can try to point you in the right direction...
>
>You'd want to compile mod_php as a filter, not a handler, and have
>mod_perl run as a response handler. In addition, you'd want to
>SetOutputFilter PHP for the request and possible have mod_perl set the
>content-type to application/x-httpd-php
>
>Give that a try and see if it does what you want.
>
> Issac
>
>Blaine Everingham wrote:
> > Hi,
> >
> > I think I might of read something somewhere that indicated that Apache
> > 2 could run multiple application layers before displaying content.
> > However, I can not find this again, and any information would be helpful.
> >
> > Does anyone know if it's possible to have
> >
> > 1) Apache run mod perl (obviously it can)
> > 2) Then take the mod_perl resulting page and parse it using PHP
> > 3) Display the output
> >
> > Thanks,
> > Blaine
> >
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server
> > Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe[at]httpd.apache.org
> > " from the digest: users-digest-unsubscribe[at]httpd.apache.org
> > For additional commands, e-mail: users-help[at]httpd.apache.org
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe[at]httpd.apache.org
> " from the digest: users-digest-unsubscribe[at]httpd.apache.org
>For additional commands, e-mail: users-help[at]httpd.apache.org

_________________________________________________________
Blaine Everingham, Software Developer
World Web Technologies Inc.
Direct: 403 218-4663
Office: 403 777-9300
Toll Free: 1-800-221-3429
Fax: 403 777-9304

<http://www.worldweb.com/>WorldWeb.com | internet + travel




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe[at]httpd.apache.org
" from the digest: users-digest-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: users-help[at]httpd.apache.org


wrowe at rowe-clan

Nov 16, 2007, 10:48 AM

Post #5 of 5 (149 views)
Permalink
Re: Can Apache 2 run mod_perl then php? [In reply to]

Blaine Everingham wrote:
> I'm still having an issue tying to get this running. Below is what I
> have so far, however I believe that the output filter of x-httpd-php is
> wrong. I'm not sure where I would find the compiled filter name for
> this. Does anyone know?

It's borked - you specified the "x-httpd-php" CONTENT GENERATOR.

You wanted the "PHP" output filter, provided you build and load the
apache2filter sapi. (NOT apache2handler sapi!)

Bill

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe[at]httpd.apache.org
" from the digest: users-digest-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: users-help[at]httpd.apache.org

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.