You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Beau E. Cox" <be...@beaucox.com> on 2002/12/06 00:49:13 UTC

[mp2]Cookies?

Hi -

I can't get cookies to work on AP/MP 2. Even in
compat mode. I'm not sure if this is a mod_perl,
apache, or a my stupidity question, but I'm posting it here
anyway.

I've searched the archives, CPAN, etc. and can't seem
to find the issue addressed. If I'm asking an already
answered question, sorry.

Aloha => Beau.

PS: Is it time for a separate mp2 list? It sure would help
in searching the archives if you are specifically looking
for an mp2 issue.


RE: [mp2]Cookies?

Posted by "Beau E. Cox" <be...@beaucox.com>.
Hi Stas -

OK! Will do.

Aloha => Beau.

-----Original Message-----
From: Stas Bekman [mailto:stas@stason.org]
Sent: Thursday, December 05, 2002 4:07 PM
To: Beau E. Cox
Cc: Randy Kobes; Modperl
Subject: Re: [mp2]Cookies?


Beau E. Cox wrote:
> Hi Randy -
> 
> Sorry, I should have been more explicit. I am
> trying to use Apache::Cookie.

AFAIK, Apache::Cookie won't work under mp2, because Apache::Request 
wasn't ported yet. Trying using CGI::Cookie for now, as it has the same 
API and implemented in pure perl.

Notice that this is not an issue of Apache::compat, because 
Apache::Cookie is implemented in XS.

> What's with the Apache/test.pm (small 't')? I added use Apache2;
> (to add apache2 stuff to the @INC) - same results with or
> without it. Searched for Apache/_small t _est.pm - not found.

That's an older testing package coming from mp1. It won't work with mp2.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: [mp2]Cookies?

Posted by Stas Bekman <st...@stason.org>.
Beau E. Cox wrote:
> Hi Randy -
> 
> Sorry, I should have been more explicit. I am
> trying to use Apache::Cookie.

AFAIK, Apache::Cookie won't work under mp2, because Apache::Request 
wasn't ported yet. Trying using CGI::Cookie for now, as it has the same 
API and implemented in pure perl.

Notice that this is not an issue of Apache::compat, because 
Apache::Cookie is implemented in XS.

> What's with the Apache/test.pm (small 't')? I added use Apache2;
> (to add apache2 stuff to the @INC) - same results with or
> without it. Searched for Apache/_small t _est.pm - not found.

That's an older testing package coming from mp1. It won't work with mp2.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


RE: [mp2]Cookies?

Posted by "Beau E. Cox" <be...@beaucox.com>.
Hi Randy -

Sorry, I should have been more explicit. I am
trying to use Apache::Cookie. My Apache2 startup
script looks something like:

	...
	use Apache2 ();
	use lib qw(/srv/www/perl);
	use Apache::compat ();
	use ModPerl::Util (); #for CORE::GLOBAL::exit
	use Apache::RequestRec ();
	use Apache::RequestIO ();
	use Apache::RequestUtil ();
	use Apache::Server ();
	use Apache::ServerUtil ();
	use Apache::Connection ();
	use Apache::Log ();
	use Apache::Session ();
	use Apache::Cookie ();
	...

Starting Apache2 with this script results in:

[Thu Dec 05 15:01:03 2002] [error] Can't locate object method "boot" via
package "mod_perl" at
/usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/Apache/Cookie.pm line
10.
Compilation failed in require at /srv/www/conf/startup.pl line 27.
BEGIN failed--compilation aborted at /srv/www/conf/startup.pl line 27.
Compilation failed in require at (eval 1) line 1.

Well, I say, what about that libapreq module I've heard about?
OK, so I get libapreq-1.1_rc1 (I figure, why not the latest?) untar
it, and:

	perl Makefile.PL -apxs /mypathtoapache2apxs

and got:

Can't locate Apache/test.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/Apache2
/usr/lib/perl5/5.8.0/i586-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at Makefile.PL
line 6.
BEGIN failed--compilation aborted at Makefile.PL line 6.

What's with the Apache/test.pm (small 't')? I added use Apache2;
(to add apache2 stuff to the @INC) - same results with or
without it. Searched for Apache/_small t _est.pm - not found.

I have the newbie blues....

Aloha => Beau.

-----Original Message-----
From: Randy Kobes [mailto:randy@theoryx5.uwinnipeg.ca]
Sent: Thursday, December 05, 2002 2:40 PM
To: Beau E. Cox
Cc: Modperl
Subject: Re: [mp2]Cookies?


On Thu, 5 Dec 2002, Beau E. Cox wrote:

> Hi -
>
> I can't get cookies to work on AP/MP 2. Even in
> compat mode. I'm not sure if this is a mod_perl,
> apache, or a my stupidity question, but I'm posting it here
> anyway.

Are you trying a module, or a home-grown solution?

--
best regards,
randy kobes




Re: [mp2]Cookies?

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Thu, 5 Dec 2002, Beau E. Cox wrote:

> Hi -
> 
> I can't get cookies to work on AP/MP 2. Even in
> compat mode. I'm not sure if this is a mod_perl,
> apache, or a my stupidity question, but I'm posting it here
> anyway.

Are you trying a module, or a home-grown solution?

-- 
best regards,
randy kobes