You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Edouard Lagache <la...@canebas.org> on 2003/02/13 23:08:57 UTC
epmain.c compile error?
Dear "wiser than I" EmbPerl fans,
I have been playing around with EmbPerl as a standalone tool, but cannot
seem to coax the critter to work with Apache 2.0.44 and mod_perl 1.99_08.
This is on a RedHat LINUX 8.0 machine, but upgraded to kernel 2.4.20,
running gcc 3.2, and Perl 5.8.0 built from source.
I've gotten mod_perl to build and install okay. Apache doesn't crash and
burn when you load the module. Also, compiling EmbPerl 2.0.8b without
mod_perl support works fine. However, when trying to build EmbPerl, the
compiler chokes with the following:
epmain.c:906: syntax error before '*' token
epmain.c:907: `table_entry' undeclared (first use in this function)
epmain.c:907: (Each undeclared identifier is reported only once
epmain.c:907: for each function it appears in.)
epmain.c:907: `hdrs' undeclared (first use in this function)
epmain.c:909: `hdrs_arr' undeclared (first use in this function)
epmain.c:910: parse error before ')' token
make: *** [epmain.o] Error 1
When I peek into this code, I see it thick in #ifdefs and other
compilation "adjustments." Should some symbol be "defed" or "undefed" to
get this beastie past this point ... so I can break it in some new way!
Thanks in advance for any Perls of wisdom! :-)
Peace, Edouard :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Embperl happy with SpeedyCGI (Re: Embperl::Execute within FastCGI
app?)
Posted by Edouard Lagache <la...@canebas.org>.
Dear Gerald (and Embperl users,)
Thanks for getting back to me on this and glad to see 2.0b9!! :-)
No rush on this problem. I won't doing anything with FastCGI for at
least a month. FYI though, ... my e-card application that uses Embperl
(Penguin Greetings) runs just great using SpeedyCGI <http://
www.daemoninc.com/SpeedyCGI/>. While lacking as much configuration
controls, it is much easier to use and just about any script can use it.
All you need to do to use a standard CGI script as a SpeedyCGI script is
to swap the /usr/bin/perl at the top with /usr/bin/speedy !! I haven't
tried embpcgi.pl with SpeedyCGI, but since Penguin Greetings makes
basically the same calls, I assume it would work too.
Another trick to throw into the toolbox!
Peace, Edouard :-)
==================================
Edouard Lagache
Lead Developer, Penguin Greetings
http://pgreet.sourceforge.net/
pgreetdev@canebas.org
----------------------------------
Gerald Richter <ri...@ecos.de> wrote at Thu, 12 Jun 2003 23:22:34 +0200
>>
>> FastCGI: server "/home/httpd/cgi-bin/pgreet.pl.fcgi" stderr: Usage:
>> FCGI::Stream::READ(stream, bufsv, len, ...) at /usr/lib/perl5/site_perl/
>> 5.8.0/i686-linux-thread-multi/Embperl.pm line 109.
>>
>> Now line 109 is the line with the asterisks below from this snippet of
>> file Embperl.pm.
>>
>
>The error occurs somewhere in C code that is called via ExecutRequest, which
>in turn calls FCGI::Stream::READ somewhere.
>
>I never have tested fastcgi with Perl 5.8.0, so it might be that something
>has changed in the FCGI.pm interface.
>
>The other thing is that the tie interface of Perl has changed in 5.8.0 and
>FCGI I/O is done via a tied filehandle, so this might be the reason. I
>currently have no test box, with Perl 5.8.0 and fastcgi to check this out.
>Hopefully I will have during next few weeks, but I cannot promise
>
>Gerald
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Embperl::Execute within FastCGI app?
Posted by Gerald Richter <ri...@ecos.de>.
>
> FastCGI: server "/home/httpd/cgi-bin/pgreet.pl.fcgi" stderr: Usage:
> FCGI::Stream::READ(stream, bufsv, len, ...) at /usr/lib/perl5/site_perl/
> 5.8.0/i686-linux-thread-multi/Embperl.pm line 109.
>
> Now line 109 is the line with the asterisks below from this snippet of
> file Embperl.pm.
>
The error occurs somewhere in C code that is called via ExecutRequest, which
in turn calls FCGI::Stream::READ somewhere.
I never have tested fastcgi with Perl 5.8.0, so it might be that something
has changed in the FCGI.pm interface.
The other thing is that the tie interface of Perl has changed in 5.8.0 and
FCGI I/O is done via a tied filehandle, so this might be the reason. I
currently have no test box, with Perl 5.8.0 and fastcgi to check this out.
Hopefully I will have during next few weeks, but I cannot promise
Gerald
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Embperl::Execute within FastCGI app?
Posted by Edouard Lagache <la...@canebas.org>.
Dear Embperl folks,
I'm trying to improve the performance of my greeting card application by
using FastCGI. I'm using the CGI::Fast interface and the Apache-2
mod_fastcgi module. Sample FastCGI programs work fine and my script will
bring up the login screen, but anything after that generates the
following weird error:
FastCGI: server "/home/httpd/cgi-bin/pgreet.pl.fcgi" stderr: Usage:
FCGI::Stream::READ(stream, bufsv, len, ...) at /usr/lib/perl5/site_perl/
5.8.0/i686-linux-thread-multi/Embperl.pm line 109.
Now line 109 is the line with the asterisks below from this snippet of
file Embperl.pm.
if (!ref $_ep_param)
{
Embperl::Req::ExecuteRequest (undef, { inputfile => $_ep_param,
param => [@_]}) ;
}
else
{
*** Embperl::Req::ExecuteRequest (undef, $_ep_param) ;
}
}
Clearly the error has something to do with reassigning IO streams, but
since Embperl works with FastCGI, I wasn't sure why this would be a
problem. I looked at the call Embperl::Execute in embpfastcgi.pl and
didn't see any special calling convention. Is there some special trick
to call Embperl from within a fastCGI application?
Thanks in advance for your help!
Peace, Edouard :-)
==================================
Edouard Lagache
Lead Developer, Penguin Greetings
http://pgreet.sourceforge.net/
pgreetdev@canebas.org
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re[4]: EMBPERL_OBJECT_BASE (Solution!! :-)
Posted by Edouard Lagache <la...@canebas.org>.
Dear Embperl folks,
Thanks to Gavin, Jaak, and Tia for all their support and patience. So
the solution for my apache httpd.conf file was to (for anyone
searching the list with this problem:)
# Include the Embperl shared library
LoadModule embperl_module modules/Embperl.so
# Turn on Embperl Environment
Embperl_UseEnv on
# Now within the directory where you are working
<Directory "/www/mydir">
# Assign an application name for your web environment
EMBPERL_APPNAME My_app_name
# only NOW can you assign this file!! :-)
EMBPERL_OBJECT_BASE My_base_obj.epl.html
.
.
.
</Directory>
Thanks again!
Peace, Edouard :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Re[3]: EMBPERL_OBJECT_BASE (again :-()
Posted by Jaak <va...@hot.ee>.
On Fri, 2003-03-21 at 02:20, Edouard Lagache wrote:
> Dear Tia and other Embperl folks,
>
hi!
You also must have EMBPERL_APPNAME declaration in your config.
>>From README.v2:
- For every container in your httpd.conf (e.g.
VirtualHost,Directory,Location)
where you want to define any application level configuration
directives
(see below under tAppConfig for a list), you need to set a unique
value for EMBPERL_APPNAME. This is for example necessay for all
Embperl::Object parameters. Example:
<Location /eo>
EMBPERL_APPNAME my_embperl_app
EMBPERL_OBJECT_BASE base.epl
</Location>
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re[3]: EMBPERL_OBJECT_BASE (again :-()
Posted by Edouard Lagache <la...@canebas.org>.
Dear Tia and other Embperl folks,
I added this declaration right below the use of Embperl like this:
### EmbPerl declarations
PerlModule Embperl
Embperl_UseEnv on
AddType text/html .epl
Alas, nope this didn't change a thing. Embperl still looks for
'_base.epl' only. I've attached my whole httpd.conf in case the
problem lies elsewhere. *Sigh*, S-S-S-Simple ... isn't it!
Thank again for all your help!
Peace, Edouard :-)
======================================================
On Thu, Mar 20, 2003 at 11:08:22PM +0200, Dimka wrote:
> EL> Alas, this didn't change as much as I would have hoped. Now my httpd.conf
> EL> file is being happily used, but my declarations are still being ... ignored
> EL> :-( Observe:
>
> EL> [Thu Mar 20 11:57:06 2003] [error] [28298]ERR: 404: : Not found '_base.epl', searched:
> EL> [Thu Mar 20 11:57:06 2003] [error] Embperl::Object base _base.epl not found. Searched '/home/httpd/htdocs' and ''
>
> EL> I've attached my latest httpd.conf file snippet. Does anyone else see some
> EL> other obvious stupid mistake that was desperately struggling to come
> EL> out from my last mistake? :-)
>
> Hi,
>
> You have to set in your apache conf file "Embperl_UseEnv on".
> p.s. This must be outside of "Directory" tag.
>
> tia,
Re[2]: EMBPERL_OBJECT_BASE (? saga continues :-( )
Posted by Dimka <di...@dimka.ee>.
EL> Alas, this didn't change as much as I would have hoped. Now my httpd.conf
EL> file is being happily used, but my declarations are still being ... ignored
EL> :-( Observe:
EL> [Thu Mar 20 11:57:06 2003] [error] [28298]ERR: 404: : Not found '_base.epl', searched:
EL> [Thu Mar 20 11:57:06 2003] [error] Embperl::Object base _base.epl not found. Searched '/home/httpd/htdocs' and ''
EL> I've attached my latest httpd.conf file snippet. Does anyone else see some
EL> other obvious stupid mistake that was desperately struggling to come
EL> out from my last mistake? :-)
Hi,
You have to set in your apache conf file "Embperl_UseEnv on".
p.s. This must be outside of "Directory" tag.
tia,
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: EMBPERL_OBJECT_BASE (? saga continues :-( )
Posted by Edouard Lagache <la...@canebas.org>.
Dear Emperl folks,
Thanks Jaak! Indeed I didn't have Embperl.so loaded. (How did I manage to
get this far without that?!?!? :-)
Alas, this didn't change as much as I would have hoped. Now my httpd.conf
file is being happily used, but my declarations are still being ... ignored
:-( Observe:
[Thu Mar 20 11:57:06 2003] [error] [28298]ERR: 404: : Not found '_base.epl', searched:
[Thu Mar 20 11:57:06 2003] [error] Embperl::Object base _base.epl not found. Searched '/home/httpd/htdocs' and ''
I've attached my latest httpd.conf file snippet. Does anyone else see some
other obvious stupid mistake that was desperately struggling to come
out from my last mistake? :-)
Thanks again to all!!
Edouard :-)
#### ModPerl Configuration ####
# Add the Mod Perl module
LoadModule perl_module modules/mod_perl.so
LoadModule embperl_module modules/Embperl.so
PerlModule Apache2
# PerlModule Apache::compat
PerlModule ModPerl::Registry
# Workspace for Perl development
Alias /perl/ /home/httpd/perl/
<Location /perl/>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
</Location>
### EmbPerl declarations
PerlModule Embperl
AddType text/html .epl
<Files *.epl>
SetHandler perl-script
PerlHandler Embperl
Options ExecCGI
</files>
# Setup EmbPerl handler for Object oriented example for main page.
<Directory "/home/httpd/htdocs">
EMBPERL_OBJECT_BASE CanebasTemplate.epl
EMBPERL_LOG /var/log/httpd/embperl.log
EMBPERL_DEBUG 1
<FilesMatch ".*\.epl\.html$">
Options All
AcceptPathInfo on
AllowOverride All
SetHandler perl-script
PerlHandler Embperl::Object
</FilesMatch>
<FilesMatch ".*\.epl$">
Order allow,deny
Deny From all
</FilesMatch>
</Directory>
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: EMBPERL_OBJECT_BASE (?? - The sequel!)
Posted by Jaak <va...@hot.ee>.
hi!
> Shutting down httpd: [ OK ]
> Starting httpd: Syntax error on line 260 of /etc/httpd/conf/httpd.conf:
> Invalid command 'EMBPERL_OBJECT_BASE', perhaps mis-spelled or defined by
> a module not included in the server configuration
>
> so .... presumably the error is elsewhere. Here is more of my
> httpd.conf file. What's obviously wrong that I can't spot but one of you
> all will immediately see! :-)
>
> #### ModPerl Configuration ####
> # Add the Mod Perl module
> LoadModule perl_module modules/mod_perl.so
You also have to load Embperl.so and then it shoud work.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
EMBPERL_OBJECT_BASE (?? - The sequel!)
Posted by Edouard Lagache <la...@canebas.org>.
Dear Gavin (and fellow Embperl-ophiles,)
Well, .... I did wuz you'all said, but my installation of Apache,
mod_perl, Embperl, etc. doesn't find it agreeable. Now I get the
following error from Apache when I try to start:
Shutting down httpd: [ OK ]
Starting httpd: Syntax error on line 260 of /etc/httpd/conf/httpd.conf:
Invalid command 'EMBPERL_OBJECT_BASE', perhaps mis-spelled or defined by
a module not included in the server configuration
so .... presumably the error is elsewhere. Here is more of my
httpd.conf file. What's obviously wrong that I can't spot but one of you
all will immediately see! :-)
#### ModPerl Configuration ####
# Add the Mod Perl module
LoadModule perl_module modules/mod_perl.so
PerlModule Apache2
# PerlModule Apache::compat
PerlModule ModPerl::Registry
# Workspace for Perl development
Alias /perl/ /home/httpd/perl/
<Location /perl/>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
</Location>
### EmbPerl declarations
PerlModule Embperl
AddType text/html .epl
<Files *.epl>
SetHandler perl-script
PerlHandler Embperl
Options ExecCGI
</files>
# Setup EmbPerl handler for Object oriented example for main page.
<Directory "/home/httpd/htdocs/prototype">
<FilesMatch ".*\.epl\.html$">
SetHandler perl-script
PerlHandler Embperl::Object
EMBPERL_OBJECT_BASE CanebasTemplate.epl
Options ExecCGI
</FilesMatch>
<FilesMatch ".*\.epl$">
Order allow,deny
Deny From all
</FilesMatch>
</Directory>
Let's hear it for multiple eyes!
Peace, Edouard :-)
Gavin Carr <ga...@openfusion.com.au> wrote at Tue, 18 Mar 2003 08:02:48 +1100
>Hi Edouard,
>
>On Mon, Mar 17, 2003 at 10:11:28AM -0800, Edouard Lagache wrote:
>> A minor glitch that I couldn't find in listserv archives though. Just
>> setting the EMBPERL_OBJECT_BASE environmental variable in the Apache
>> configuration file seems to have no effect. If I instead just use
>> _base.epl as my base object everything is happy as a clam, but it would
>> be nice to choose my own file name. Is this just a bug on the "low
>> priority fix it" list or is the example in the Embperl documentation
>>obsolete?
>
>Embperl2 uses full-fledged Apache directives rather than environment
>variables,
>so just use 'EMBPERL_OBJECT_BASE template.epl', without the PerlSetEnv.
>
>Cheers,
>Gavin
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
>For additional commands, e-mail: embperl-help@perl.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: PerlSetEnv EMBPERL_OBJECT_BASE (??)
Posted by Gavin Carr <ga...@openfusion.com.au>.
Hi Edouard,
On Mon, Mar 17, 2003 at 10:11:28AM -0800, Edouard Lagache wrote:
> A minor glitch that I couldn't find in listserv archives though. Just
> setting the EMBPERL_OBJECT_BASE environmental variable in the Apache
> configuration file seems to have no effect. If I instead just use
> _base.epl as my base object everything is happy as a clam, but it would
> be nice to choose my own file name. Is this just a bug on the "low
> priority fix it" list or is the example in the Embperl documentation obsolete?
Embperl2 uses full-fledged Apache directives rather than environment variables,
so just use 'EMBPERL_OBJECT_BASE template.epl', without the PerlSetEnv.
Cheers,
Gavin
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
PerlSetEnv EMBPERL_OBJECT_BASE (??)
Posted by Edouard Lagache <la...@canebas.org>.
Dear Embperl fans,
After getting one web site settled out on Embperl, I graduated to
Embperl::Object for my main Canebas web site - Ooh, I like this!! :-)
A minor glitch that I couldn't find in listserv archives though. Just
setting the EMBPERL_OBJECT_BASE environmental variable in the Apache
configuration file seems to have no effect. If I instead just use
_base.epl as my base object everything is happy as a clam, but it would
be nice to choose my own file name. Is this just a bug on the "low
priority fix it" list or is the example in the Embperl documentation obsolete?
Thanks to Gerald and friends for such a cool toy! (err, tool :-)
Edouard :-)
P.S. Just to lay out the parameters completely, the affected part of
httpd.conf is:
# Setup EmbPerl handler for Object oriented example for main page.
<Directory "/home/httpd/htdocs/prototype">
PerlSetEnv EMBPERL_OBJECT_BASE template.epl
<FilesMatch ".*\.epl\.html$">
SetHandler perl-script
PerlHandler Embperl::Object
Options ExecCGI
</FilesMatch>
<FilesMatch ".*\.epl$">
Order allow,deny
Deny From all
</FilesMatch>
</Directory>
and the entry in the Apache error log is:
[Mon Mar 17 09:50:45 2003] [notice] Apache/2.0.44 (Unix) mod_perl/1.99_08
Perl/v5.8.0 configured -- resuming normal operations
[Mon Mar 17 09:50:53 2003] [error] [6338]ERR: 404: : Not found
'_base.epl', searched:
[Mon Mar 17 09:50:53 2003] [error] Embperl::Object base _base.epl not
found. Searched '/home/httpd/htdocs/prototype /home/httpd/htdocs' and
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Embperl::Execute with your variables?
Posted by Kee Hinckley <na...@somewhere.com>.
At 5:14 PM -0800 3/10/03, Edouard Lagache wrote:
>Dear EmbPerl veterans,
>
>I'm trying to incorporate EmbPerl into a web-based greeting card program,
>and I would like allow card designers to have access to about 25+
>variables from the main script in their HTML templates.
Your simplest solution might be to simply stuff the variables into an
external package. But you'd want to make them read-only presumably,
so maybe a method would be best.
So you could pass in the "param" variable a pointer to an object, and
then they could call that.
$_[0]->myvar1()
$_[0]->myvar2()
Or even $[0]_->var('name of var')
If you're using EmbperlObject you can get the same kind of effect by
making their fields a child of a parent object that has those methods.
Unfortunately there's not a good way to automatically get a "$this"
or "$self" variable. Unless you tell them to start their code with
something like:
[$ var $this $][- $this = shift -]
Which is in fact how I start all of my EmbperlObject files.
I'm afraid I'm not being terribly clear. It's been a long day. But
if nobody else does a better job of explaining let me know and I'll
dig up some examples.
--
Kee Hinckley
http://www.puremessaging.com/ Junk-Free Email Filtering
http://commons.somewhere.com/buzz/ Writings on Technology and Society
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Embperl::Execute with your variables?
Posted by Edouard Lagache <la...@canebas.org>.
Dear EmbPerl veterans,
I'm trying to incorporate EmbPerl into a web-based greeting card program,
and I would like allow card designers to have access to about 25+
variables from the main script in their HTML templates.
I thought I could use something like this from the example file Execute.pl:
$MyPackage::Interface::Var = 'Some Var' ;
Embperl::Execute ({input => \'<P>Transfer some vars [+ $Var +] !</P>',
inputfile => 'Var',
mtime => 1,
'package' => 'MyPackage::Interface',
req_rec => $r}) ;
However, I'm puzzled by the use of the option key 'inputfile' and can't
see how to specify more than one variable - never mind 25! Has someone
messed around with this feature and would have some examples in between
this one and just reading the .pm source code? :-)
Peace, Edouard :-)
--------------------------
Edouard Lagache, Sysadmin
canebas.org
elagache@canebas.org
29 Altamount Drive
Orinda, CA, 94563
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Thanks! Happy Camel! (Re: ModPerl registry woes?)
Posted by Edouard Lagache <la...@canebas.org>.
Thanks Randy and Gerald!
Finally, all obstacles are overcome and EmbPerl is running happy on
<canebas.org>!
Sigh, now I've got to convert all my static web pages! :-)
Peace, Edouard :-)
=========================================
Randy Kobes <ra...@theoryx5.uwinnipeg.ca> wrote at Sun, 16 Feb
2003 13:00:41 -0600
>On Sun, 16 Feb 2003, Edouard Lagache wrote:
>
>> Dear EmbPerl veterans,
>>
>> I'm still trying to get EmbPerl to cooperate with Mod_Perl
>> 1.99_08 and Apache 2.0.44. Thanks to Gerald Richter, I got
>> past my compile error by using the CVS version, but now I can't
>> get past the test suite at the point it tried to fire up
>> Apache. If I run the test suite unaltered - the error I get
>> is:
>>
>> Starting httpd... [Sun Feb 16 09:33:51 2003] [warn] PassEnv
>> variable ACTION_PREFIX was undefined
>>
>> [Sun Feb 16 09:33:51 2003] [error] Can't locate ModPerl/Registry.pm
>> in @INC
>>
>> Well, ModPerl/Registry.pm is actually in Apache2/ModPerl/Registry.pm.
>> So, I tried making a symlink so that there was a ModPerl/Registry.pm.
>> Alas, that has no effect.
>[ .. ]
>
>Try putting in a 'use Apache2;' in Embperl.pm, at around line 69,
>and also in test/conf/startup.pl, at around line 34, just around
>the parts where mod_perl 2 stuff is being pulled in.
>
>--
>best regards,
>randy kobes
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: ModPerl registry woes?
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sun, 16 Feb 2003, Edouard Lagache wrote:
> Dear EmbPerl veterans,
>
> I'm still trying to get EmbPerl to cooperate with Mod_Perl
> 1.99_08 and Apache 2.0.44. Thanks to Gerald Richter, I got
> past my compile error by using the CVS version, but now I can't
> get past the test suite at the point it tried to fire up
> Apache. If I run the test suite unaltered - the error I get
> is:
>
> Starting httpd... [Sun Feb 16 09:33:51 2003] [warn] PassEnv
> variable ACTION_PREFIX was undefined
>
> [Sun Feb 16 09:33:51 2003] [error] Can't locate ModPerl/Registry.pm
> in @INC
>
> Well, ModPerl/Registry.pm is actually in Apache2/ModPerl/Registry.pm.
> So, I tried making a symlink so that there was a ModPerl/Registry.pm.
> Alas, that has no effect.
[ .. ]
Try putting in a 'use Apache2;' in Embperl.pm, at around line 69,
and also in test/conf/startup.pl, at around line 34, just around
the parts where mod_perl 2 stuff is being pulled in.
--
best regards,
randy kobes
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
ModPerl registry woes?
Posted by Edouard Lagache <la...@canebas.org>.
Dear EmbPerl veterans,
I'm still trying to get EmbPerl to cooperate with Mod_Perl 1.99_08 and
Apache 2.0.44. Thanks to Gerald Richter, I got past my compile error by
using the CVS version, but now I can't get past the test suite at the
point it tried to fire up Apache. If I run the test suite unaltered -
the error I get is:
Starting httpd... [Sun Feb 16 09:33:51 2003] [warn] PassEnv
variable ACTION_PREFIX was undefined
[Sun Feb 16 09:33:51 2003] [error] Can't locate ModPerl/Registry.pm
in @INC
Well, ModPerl/Registry.pm is actually in Apache2/ModPerl/Registry.pm.
So, I tried making a symlink so that there was a ModPerl/Registry.pm.
Alas, that has no effect.
Undaunted (yet!) I decided to edit embperl/test/conf/startup.pl to change
ModPerl::Registry to Apache2::ModPerl::Registry. That produces an even
more puzzling error message:
Starting httpd... [Sun Feb 16 09:35:53 2003] [warn] PassEnv
variable ACTION_PREFIX was undefined
[Sun Feb 16 09:35:53 2003] [error] Base class package
"ModPerl::RegistryCooker" is empty.
(Perhaps you need to 'use' the module which defines that package
first.) at /usr/lib/perl5/site_perl/5.8.0/
i686-linux-thread-multi/Apache2/ModPerl/Registry.pm line
11
Well, the file Apache2/ModPerl/RegistryCooker.pm isn't at all empty. Nor
is Perl complaining that it can't find the file RegistryCooker.pm .... so???
I see that, even if I didn't ask for it, mod_perl 1.99_08 installed the
files to permit mod_perl 1 compatibility. Is that the problem here?
Any Perls of wisdom are as always appreciated!
Peace, Edouard :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Serve pdf files.
Posted by Gerald Richter <ri...@ecos.de>.
>
> Now I have the pdf file in $var. How do I display it with Embperl?
>
I really thinks it's easier (and faster) to make an Alias in your httpd.conf
e.g.
Alias /pdf /usr/local/pdf
If you really want to do this with Embperl, you either need a directory (or
a fileextention) that is served by Embperl only (no EMbperl::Object) or your
Embperl::Object base template must serve the pdf and exit afterwards.
Something like:
[-
$http_headers_out{'content-type'} = 'application/pdf' ;
$escmode = 0 ;
-][+ $var +]
Do must not have any spaces outside of the brackets
Gerald
--------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 939-122
WWW: http://www.ecos.de/ Fax: +49 6133 939-333
--------------------------------------------------------------
|
| Besuchen Sie uns auf der CeBIT vom 12. - 19. März 2003
| Messe Hannover * Halle 17 * Stand F 36
| http://www.cebit.de/
|
+-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Serve pdf files.
Posted by Kaare Rasmussen <ka...@kakidata.dk>.
> Try writing more about what you are trying to do instead of how you
> thought you would do it. :-)
Of course. Thought I did that, though.
I have a directory with pdf files, let's call it /usr/local/pdf. I want to be
able to display these pdf files with Embperl.
I don't want to alias the directory into htdocs space.
To do this I have a perl module with two functions.
- first function returns an array with the file names. This lets me choose the
file that I want to display.
- second function takes the file name as a parameter and returns the content
of the pdf file.
Now I have the pdf file in $var. How do I display it with Embperl?
--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2501
Howitzvej 75 Åben 12.00-18.00 Email: kar@kakidata.dk
2000 Frederiksberg Lørdag 12.00-16.00 Web: www.suse.dk
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Serve pdf files.
Posted by Gerald Richter <ri...@ecos.de>.
> Solution 3: EmbPerl will help me somehow
>
Sorry, but I am not quite understand what's your question? Is it the problem
that it's inside an EmberlObject?
Gerald
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Serve pdf files.
Posted by Ask Bjoern Hansen <as...@develooper.com>.
On Fri, 14 Feb 2003, Kaare Rasmussen wrote:
> Solution 1. Open a window with JavaScript. Write to the window with one or
> more window.document.write statements.
> Backdraw: A lot of effort has to be put into escaping pdf characters that
> could annoy JavaScript
And it could never work; unless the browser natively could figure
out to show the PDF file. It needs to be in a separate document.
> Solution 2: Put the file somewhere where I can use an URL.
> Backdraw: I have to maintain some kind of temporary directory and unique
> file names.
The directory or file does not necessarily have to exist.
Try writing more about what you are trying to do instead of how you
thought you would do it. :-)
- ask
--
ask bjoern hansen, http://www.askbjoernhansen.com/ !try; do();
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Serve pdf files.
Posted by Kaare Rasmussen <ka...@kakidata.dk>.
I would like to serve some pdf documents with Embperl. I don't want Apache
to do it if I can avoid it.
I can't just put "$http_headers_out{'Content-Type'} = 'application/pdf';"
at the top; this is in the middle of an EmbperlObject page that has more
work to do.
Solution 1. Open a window with JavaScript. Write to the window with one or
more window.document.write statements.
Backdraw: A lot of effort has to be put into escaping pdf characters that
could annoy JavaScript
Solution 2: Put the file somewhere where I can use an URL.
Backdraw: I have to maintain some kind of temporary directory and unique
file names.
Solution 3: EmbPerl will help me somehow
--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2501
Howitzvej 75 Åben 12.00-18.00 Web: www.suse.dk
2000 Frederiksberg Lørdag 12.00-16.00 Email:kar@kakidata.dk
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: epmain.c compile error?
Posted by Gerald Richter <ri...@ecos.de>.
>
> epmain.c:906: syntax error before '*' token
> epmain.c:907: `table_entry' undeclared (first use in this function)
This error is fixed in the CVS Version of Embperl
Gerald
--------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 939-122
WWW: http://www.ecos.de/ Fax: +49 6133 939-333
--------------------------------------------------------------
|
| Besuchen Sie uns auf der CeBIT vom 12. - 19. März 2003
| Messe Hannover * Halle 11 * Stand D42/18
| http://www.cebit.de/
|
+-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org