You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Gerald Richter <ri...@ecos.de> on 2003/01/01 21:05:22 UTC
Re: AddOutputFilter EMBPERL ???
>How do I add Embperl as an Output Filter?
The only way it works for now is calling your PHP page from Embperl, like
[- Execute ({subreq => '/uri/path/to/foo.php'}) -]
So you can use Embperl::Object:
Embperl_Object_Base base.epl
Embperl_Appname phpfilter
and in base.epl you write
[-
$r = shift ;
Execute ({subreq => $r -> param -> unparsed_uri})
-]
Additonaly you should tell Embperl not to read in the POSTed form data,
other wise PHP will not see them by setting
optDisableFormData
Gerald
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: AddOutputFilter EMBPERL ???
Posted by Gerald Richter <ri...@ecos.de>.
>[76195]ERR: 675407878: test.php(1): Error (no description) 675407878
>(status=200) /test.php
Mmmh, you config seems to be ok, also either Files or FilesMatch should be
enough. I have to setup a similar configuration and checkit out here. Maybe
there is a problem with the newer version of Apache, because I have only
tested it against 2.0.39. It's already on my to do list to install the
newest Apache 2 and test Embperl against it. I come back to you soon as I
have this done...
>Do you think a
>
><FilesMatch .php>
> SetHandler perl-script
> PerlHandler Embperl::Object
> Options ExecCGI
></FilesMatch>
>
>could be set up to work
Yes, if you add the necessary Embperl config directives.
>Please save me some lookup time... ;-) where to place
>optDisableFormData?
Embperl_Options in httpd.conf (as numeric value)
Gerald
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
AW: AddOutputFilter EMBPERL ???
Posted by Jörg Kütemeier <jk...@wolf-systems.net>.
Hi,
I tried it out with this:
<FilesMatch ".*.epl$">
SetHandler perl-script
PerlHandler Embperl
Options ExecCGI
# Order allow,deny
# Deny From all
</FilesMatch>
AddType application/x-httpd-php .php
<FilesMatch .epl>
SetHandler perl-script
PerlHandler Embperl
Options ExecCGI
</FilesMatch>
AddType application/x-httpd-php .php
A test.epl:
<html>
<head></head>
<body>
[- $test="Hallo" -][+ $test +]
[$ syntax EmbperlBlocks $]
[-
$r = shift ;
Execute ({subreq => '/test.php'})
-]
</body>
</html>
a test.php:
<html>
<head></head>
<body>
<h1>Test PHP</h1>
<?php echo "Test" ?>
</body>
</html>
But it ended in:
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, you@your.address and inform
them of the time the error occurred, and anything you might have done
that may have caused the error.
[76195]ERR: 675407878: test.php(1): Error (no description) 675407878
(status=200) /test.php
Embperl/2.0b9_dev-3 Apache/2.0.43 (Unix) mod_perl/1.99_08-dev
Perl/v5.6.1 PHP/4.2.3 mod_ssl/2.0.43 OpenSSL/0.9.6g [Thu Jan 2 05:13:39
2003]
By the way...
Do you think a
<FilesMatch .php>
SetHandler perl-script
PerlHandler Embperl::Object
Options ExecCGI
</FilesMatch>
could be set up to work
Jörg
P.S.
Please save me some lookup time... ;-) where to place
optDisableFormData?
-----------------------------
wolf-systems IT-Services Inh. Jörg Kütemeier
http://www.wolf-systems.net
-----Ursprüngliche Nachricht-----
Von: Gerald Richter [mailto:richter@ecos.de]
Gesendet: Mittwoch, 1. Januar 2003 21:05
An: Jörg Kütemeier; embperl@perl.apache.org
Betreff: Re: AddOutputFilter EMBPERL ???
>How do I add Embperl as an Output Filter?
The only way it works for now is calling your PHP page from Embperl,
like
[- Execute ({subreq => '/uri/path/to/foo.php'}) -]
So you can use Embperl::Object:
Embperl_Object_Base base.epl
Embperl_Appname phpfilter
and in base.epl you write
[-
$r = shift ;
Execute ({subreq => $r -> param -> unparsed_uri})
-]
Additonaly you should tell Embperl not to read in the POSTed form data,
other wise PHP will not see them by setting
optDisableFormData
Gerald
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org