You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Udlei Nattis <ma...@anankeit.com.br> on 2003/02/27 18:43:43 UTC
Problem headers_out
Hi all
Why i have problem?
$cookie1 = new CGI::Cookie(
-name => 'sessid', -value => $session->id());
$r->headers_out->{'Set-Cookie'} = $cookie1;
OR
$c->headers_out->{'Set-Cookie'} = "aaasdfhajsd fjhasdhfjkajkdf";
[Thu Feb 27 14:42:34 2003] [warn] pid file
/usr/local/apache-2.0/logs/httpd.pid overwritten -- Unclean shutdown of
previous Apache run?
[Thu Feb 27 14:42:34 2003] [notice] Apache/2.0.44 (Unix)
mod_perl/1.99_09-dev Perl/v5.8.0 configured -- resuming normal operations
Use of uninitialized value (#1)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.
To help you figure out what was undefined, perl tells you what operation
you used the undefined value in. Note, however, that perl optimizes
your
program and the operation displayed in the warning may not necessarily
appear literally in your program. For example, "that $foo" is
usually optimized into "that " . $foo, and the warning will refer to
the concatenation (.) operator, even though there is no . in your
program.
[Thu Feb 27 14:42:40 2003] [error] [client 127.0.0.1] Can't locate
object method "STORE" via package "APR::Table" at
/export/eShop/lib/eShop/Web/Shop/index.pm line 30.
if i remove $r->headers_out->{'Set-Cookie'} = $cookie1;
i dont have proble ://///
i using last cvs version and httpd-2.0.44
thanks
nattis
Re: Problem headers_out
Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>
>
> Udlei Nattis wrote:
>
>> Hi all
>>
>> Why i have problem?
>>
>> $cookie1 = new CGI::Cookie(
>> -name => 'sessid', -value => $session->id());
>>
>> $r->headers_out->{'Set-Cookie'} = $cookie1;
>
> [snip]
>
>> Can't locate object method "STORE" via package "APR::Table" at
>> /export/eShop/lib/eShop/Web/Shop/index.pm line 30.
>>
>> if i remove $r->headers_out->{'Set-Cookie'} = $cookie1;
>
>
> you need to
>
> use APR::Table;
>
> in your script.
In the future use:
http://perl.apache.org/docs/2.0/api/ModPerl/MethodLookup.html#lookup_method__
The reason is explained here:
http://perl.apache.org/docs/2.0/user/compat/compat.html#Code_Porting
also please remember to mark your subject with mp2 when asking mp2 questions.
__________________________________________________________________
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: Problem headers_out
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Udlei Nattis wrote:
> Hi all
>
> Why i have problem?
>
> $cookie1 = new CGI::Cookie(
> -name => 'sessid', -value => $session->id());
>
> $r->headers_out->{'Set-Cookie'} = $cookie1;
[snip]
> Can't locate
> object method "STORE" via package "APR::Table" at
> /export/eShop/lib/eShop/Web/Shop/index.pm line 30.
>
> if i remove $r->headers_out->{'Set-Cookie'} = $cookie1;
you need to
use APR::Table;
in your script.
HTH
--Geoff