You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by vimal <vi...@jobsahead.com> on 2005/09/29 16:11:49 UTC

Embperl (Apache2::Request ) is not working with embperl.

Hi Gerald,
I am facing a problem. I am using Apache2.0.52 with mod_perl2 and embperl2.
When I use Apache2::Request to create a new object by Apache::Request->new.
This gives me segmentation fault and the child process died.
Now i execute the same code from command line using embpexec.pl it gives 
the following error.

[vimal@vimal temp]$ embpexec.pl emtest.html
/usr/bin/perl: error while loading shared libraries: 
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so: 
undefined symbol: modperl_xs_sv2request_rec

My Code is
<html>
<title>vimal Here</title>
<body>
hello
[-
use Apache2::Request;
use APR::Pool;
my $r = APR::Pool->new;
my $q = Apache2::Request->new($r);
print"vimal";
-]
</body>
</html>

please tell me the reason what i did wrong.

Thanks and Regards,
Vimal Gupta

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


RE: Newbie can't turn off html processing in Embperl 2.0

Posted by Gerald Richter <ri...@ecos.de>.
> 
> According to the docs setting EMBPERL_OPTIONS to 512 
> "optDisableHtmlScan" should "disable html scan" but it 
> doesn't seem to be working because I can get errors from 
> Embperl about things like: 
> 

This was Embperl 1.

For Embperl 2 use

Embperl_Syntax EmbperlBlocks

In your httpd.conf or 

[$ syntax EmbperlBlocks $]

Inside a page (you can switch back, also multiple times, with [$ syntax
Embperl $])

Gerald




 
** Virus checked by BB-5000 Mailfilter ** 


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Newbie can't turn off html processing in Embperl 2.0

Posted by Carl Eklof <ca...@yahoo.com>.
Hello,

I'm new to Embperl, and certainly to this list, so
pardon me if this question is silly or if it is not
structured as a proper request for help. I am pretty
experienced with mod_perl however, which is why my
goal is to turn-off almost all Embperl logic, except
for the parsing of [* *] blocks.

I've been using Embperl 2.0.0 for two days, and it has
been running pretty well. The main problem(s) I've
been having have been because I can't seem to turn off
the HTML processing. There have been lot's of problems
related to that, such as having to add a comment
between any [* *] code block, that is followed by a
<table> tag (Embperl parses the page incorrectly
otherwise, which can cause very bad problems)

According to the docs setting EMBPERL_OPTIONS to 512
"optDisableHtmlScan" should "disable html scan" but it
doesn't seem to be working because I can get errors
from Embperl about things like: 

[6392]ERR: 49: blah.epl(57): Endtag '/tr' doesn't
match starttag 'table' 

I've inlined the relevent section of my httpd.conf
below.

Any ideas/help/support/empathy would be greatly
appreciated :)

-Carl

# Include the Embperl shared library
LoadModule  embperl_module  <path-to>/Embperl.so
PerlRequire Embperl.pm

# Turn on Embperl Environment
Embperl_UseEnv on

EMBPERL_LOG
/home/carl/projects/GOB/third-party/apache/logs/embperl_log
EMBPERL_SESSION_HANDLER_CLASS no
EMBPERL_OPTIONS 528
# Add 524288 for optKeepSrcInMemory (don't re-read
from disk)
EMBPERL_ESCMODE 0
EMBPERL_DEBUG 0

<Directory /home/carl/projects/GOB/uis/beethere>

    AllowOverride None

	<FilesMatch ".*\.html$">
		SetHandler  perl-script
		PerlHandler Embperl::Object
		Options     ExecCGI
	</FilesMatch>
</Directory>


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


RE: Embperl (Apache2::Request ) is not working with embperl.

Posted by Gerald Richter <ri...@ecos.de>.
Hi,

> 
> [vimal@vimal temp]$ embpexec.pl emtest.html
> /usr/bin/perl: error while loading shared libraries: 
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/AP
> R/Request/Apache2/Apache2.so: 
> undefined symbol: modperl_xs_sv2request_rec
> 

You cannot use Apache function (like APR::Pool) outside of Apache, how
should this work?

> My Code is
> <html>
> <title>vimal Here</title>
> <body>
> hello
> [-
> use Apache2::Request;
> use APR::Pool;
> my $r = APR::Pool->new;
> my $q = Apache2::Request->new($r);

Apache2::Request -> new needs a Apache2::RequestRec object, not a pool, so
inside Embperl do

my $q = Apache2::Request->new($req_rec);

$req_rec is set up by Embperl for you.

Gerald



---------------------------------------------------------------------------
Besuchen Sie uns auf der Systems 2005 in München, Halle B2, Stand 704
---------------------------------------------------------------------------
Gerald Richter            ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl

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
---------------------------------------------------------------------------
ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
---------------------------------------------------------------------------

  


 
** Virus checked by BB-5000 Mailfilter ** 


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org