On Tue, 13 Mar 2001, Daniel wrote:

>
>
>
> >> All scripts on
> >> site start with:
> >>
> >> use vars qw(%input $r);
> >> $r = Apache->request;
> >>
> >> This has worked fine...no complaints in log files...until I switched the
> >> handler from Registry to RegistryNG;
> >>
> >> Now I see occasional:
> >> Variable "$r" will not stay shared at /home/httpd/perl/daily-news.pl
> >> line 9 (#1)
> >> in log files.
> >
> >
> > http://perl.apache.org/guide/troubleshooting.html#Value_of_x_will_not_stay_shared
>
> Thanks for the reply and the guide (of which I'm pretty familiar) Stas.
> See comments above and below. $r is global in my scripts.
> Unless I'm misunderstanding something, the warning shouldn't be
> occurring. Wasn't under Registry. Also these warnings do not appear on
> every page request, so I'm wondering if it has something to do with the
> compile stage of perlrun and/or something that happens during a new
> apache process creation.

Sorry, I've jumped too fast with a conclusion at seeing the standard
"...will not stay shared". But in order to debug the problem, I have to be
able to reproduce it. Are you saying that the script below, as it is,
has this problem? But it's not the whole script, I understand. Can you
write a small reproducing test?

> >> first nine from daily-news.pl:
> >> #!/usr/bin/perl -w
> >> use strict;
> >> use DBI;
> >> use date_site;
> >> my $dateformat = date_site::dateformat;
> >> use Apache::Request;
> >>
> >> use vars qw($dbh %input %output %filebase $r %sites); #vars used on $r
> >> $r = Apache->request; #<--here
> >>
>
> Thanks,
>
> --
> Daniel Bohling
> NewsFactor Network
>



_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Reply via email to