You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by allen haim <al...@netherrealm.net> on 2005/06/09 01:24:15 UTC

Can't locate currReq.al (was: Problem with GetSession)

Hi Gerald,

now I am doing only this:

$udat = Embperl::Req::GetSession();

in the called script; however I still get the error:

-------------

[Wed Jun 08 16:22:13 2005] [error] Can't locate auto/Embperl/CurrReq.al in @INC (@INC contains: /usr/local/apache2/htdocs/warreng/ /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-th read-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/li b/perl5/vendor_perl . /usr/local/apache2) at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Embperl.pm line 350\n[Wed Jun 08 16:22:13 2005] [warn] [24374]ERR:  32:  Warning in Perl code: Constant subroutine ModPerl::ROOT::ModPerl::

---------------

what is CurrReq.al and why does it not exist?

Allen

On Wed, Jun 08, 2005 at 05:24:04AM +0200, Gerald Richter wrote:
> > 
> > I would like to call a CGI script, and have %udat be 
> > available to it. I thought the way to do that was:
> > 
> > Embperl::Req::SetupSession($req_rec);
> > Execute({subreq => '/cgi-perl/env_test.pl?param1=...&param2=...'});
> > 
> 
> Since you are already using Embperl, you don't need to call SetupSession
> 
> 
> > and then in thescript.pl I would put:
> > 
> > %udat = Embperl::Req::GetSession($req_rec);
> > 
> 
> This does not take the Apache Request Record and it returns a reference to
> %udat, so jus call it as
> 
> $udat = Embperl::Req::GetSession();
> 
> This should work.
> 
> Gerald
> 
> 

-- 
happy random snippet from Allen Haim reviewing Allen Haim:


He often begins a song with a story of the type, "I wrote this song when ... ", and the title and lyrics will match accordingly.


[more at http://www.netherrealm.net/~allen/songs]

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


RE: Can't locate currReq.al (was: Problem with GetSession)

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

> 
> > Is the called script a standalone CGI script or is it 
> executed under 
> > mod_perl?
> 
> I would like to try both. Should both work?
> 

Yes, it works, but your code has to be a little different, because when the
subrequest happend under mod_perl the session is already setup, while in the
CGI, because it's a new process, it has to be setup first.

 if ($Embperl::req)
	{
	$udat = $Embperl::req -> GetSession() ;
	}
 else
	{
	$udat = Embperl::Req::SetupSession() ;
	}

In case you change something in the session data during your CGI, you need
to call

 if (!$Embperl::req)
	{
	Embperl::Req::CleanupSession() ;
	}

> 
> and I have done 
> 
> use Embperl;
> $udat = Embperl::Req::GetSession();
> 
> in the called script, and it still gives the same error.
> 

You see in the example above that I have changed the way I call GetSession.
This one should work. The other one does not work, because CurrReq () is an
old function, that does not exists anymore, so there is no way for Perl to
find. Sorry, I missed this during my last answer

Gerald


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


Re: Can't locate currReq.al (was: Problem with GetSession)

Posted by allen haim <al...@netherrealm.net>.
> Is the called script a standalone CGI script or is it executed under
> mod_perl?

I would like to try both. Should both work?

> Did you done a
> 
>  use Embperl ;
> ?

In my httpd.conf I have

PerlModule Embperl
LoadModule  embperl_module /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Embperl/Embperl.so

and I have done 

use Embperl;
$udat = Embperl::Req::GetSession();

in the called script, and it still gives the same error.

When I run under mod_perl, it's:

[Thu Jun 09 15:16:33 2005] [error] [client 127.0.0.1] Can't locate auto/Embperl/CurrReq.al in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl . /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Embperl) at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Embperl.pm line 350, referer: http://127.0.0.1/warreng/results/results-nav.html?run_dir=/usr/local/apache2/htdocs/warreng/runs/1118247449;species=Drosophila%20melanogaster%204.0;hits_file=/usr/local/apache2/htdocs/warreng/runs/1118247449/hits.xml;       
------------

and when I run under cgi-bin, it's

[Thu Jun 09 15:09:32 2005] [error] [client 127.0.0.1] Use of inherited AUTOLOAD for non-method Embperl::CurrReq() is deprecated at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Embperl.pm line 350., referer: http://127.0.0.1/warreng/results/results-nav.html?run_dir=/usr/local/apache2/htdocs/warreng/runs/1118247449;species=Drosophila%20melanogaster%204.0;hits_file=/usr/local/apache2/htdocs/warreng/runs/1118247449/hits.xml;
[Thu Jun 09 15:09:32 2005] [error] [client 127.0.0.1] Can't locate auto/Embperl/CurrReq.al in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl . /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Embperl) at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Embperl.pm line 350, referer: http://127.0.0.1/warreng/results/results-nav.html?run_dir=/usr/local/apache2/htdocs/warreng/runs/1118247449;species=Drosophila%20melanogaster%204.0;hits_file=/usr/local/apache2/htdocs/warreng/runs/1118247449/hits.xml;                        

--------------

I don't have any experience with auto/Dynaload/etc. How can I tell if
Embperl.pm is importing all the correct symbols from Embperl.so?

Thank you

Allen

On Thu, Jun 09, 2005 at 06:42:57AM +0200, Gerald Richter wrote:
> > 
> > now I am doing only this:
> > 
> > $udat = Embperl::Req::GetSession();
> > 
> 
> Did you done a
> 
>  use Embperl ;
> ?
> 
> > in the called script; however I still get the error:
> 
> Is the called script a standalone CGI script or is it executed under
> mod_perl?
> 
> > 
> > what is CurrReq.al and why does it not exist?
> > 
> 
> Perl tries to find Embperl::CurrReq (), but it is not loaded, so it tries to
> find it as autoload function, which also not exists.
> 
> Actually it is defined in Embperl.so, which seems not correctly initialized.
> 
> Gerald
> 
> 
> 

-- 



now through the seven oceans, 
i am a star most famed;
many leggies have I lost,
many have I gained.

-donovan


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


RE: Can't locate currReq.al (was: Problem with GetSession)

Posted by Gerald Richter <ri...@ecos.de>.
> 
> now I am doing only this:
> 
> $udat = Embperl::Req::GetSession();
> 

Did you done a

 use Embperl ;
?

> in the called script; however I still get the error:

Is the called script a standalone CGI script or is it executed under
mod_perl?

> 
> what is CurrReq.al and why does it not exist?
> 

Perl tries to find Embperl::CurrReq (), but it is not loaded, so it tries to
find it as autoload function, which also not exists.

Actually it is defined in Embperl.so, which seems not correctly initialized.

Gerald




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