Closed
Bug 332555
Opened 19 years ago
Closed 19 years ago
Use of uninitialized value when clicking on "login again" link
Categories
(Bugzilla :: Installation & Upgrading, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: ycombarnous, Unassigned)
References
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
We migrated a Bugzilla 2.20 installation from one server to another.
Everything seems to work just fine, except when clicking on the "log in again" link after a logout. We get a "index.cgi: Use of uninitialized value in substitution (s///) at (eval 22) line 44" error message (but can re-log without any issues.
When we click on the "Actions => Home" link, we do not get this error message and can re-log too.
Reproducible: Always
Comment 1•19 years ago
|
||
I cannot reproduce on 2.20.2, 2.22 and 2.23.1. WFM
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
Version: unspecified → 2.20
I just tested against 2.22 and it gives the same error.
Any idea where I should look for this issue?
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
Comment 3•19 years ago
|
||
(In reply to comment #2)
> I just tested against 2.22 and it gives the same error.
> Any idea where I should look for this issue?
>
Identify this substitution line s///. I cannot find it. Have you modified Perl code or templates in some way?
Updated•19 years ago
|
Blocks: bz-warnings
I tried everything again.
Fresh install on a windows 2003 box of:
- latest mysql-nt-max
- latest perl from activeState
- latest CVS from 2.22 branch
Followed all the instructions on the windows install, and did not customize anything.
Now I get the "index.cgi: Use of uninitialized value in substitution (s///) at (eval 59) line 44" error on the homepage.
It disappears once logged in, but shows up again when trying to re-logon.
No idea where to look for this substitution, as with this fresh install, there is no customized code / DB.
Is there a way to tell from which file the error come, as there is nothing on line 44 of index.cgi ?
Comment 6•19 years ago
|
||
(In reply to comment #5)
> Is there a way to tell from which file the error come, as there is nothing on
> line 44 of index.cgi ?
>
That's the problem! :) What I don't like is this "(eval 59)" thing. glob, any idea?
hrm, weird.
add the following to globals.pl (there's something similar around line 86):
sub warn_with_dignity {
use Carp;
my ($err_msg) = @_;
print $err_msg;
cluck($err_msg);
}
$::SIG{__WARN__} = \&warn_with_dignity;
that should give us stack trace so we can tell what file the "line 44" refers to.
Cluck function (in cluck($err_msg);) was not recognized, so I replaced it with confess($err_msg).
Here is the output:
undef error - Use of uninitialized value in substitution (s///) at (eval 60) line 44. at globals.pl line 111 main::warn_with_dignity('Use of uninitialized value in substitution (s///) at (eval 60...') called at (eval 60) line 44 CGI::url('Bugzilla::CGI=HASH(0x1cc0264)', 'HASH(0x2402e14)') called at data\template\template\en\default\account\auth\login-small.html.tmpl line 24 eval {...} called at data\template\template\en\default\account\auth\login-small.html.tmpl line 24 eval {...} called at data\template\template\en\default\account\auth\login-small.html.tmpl line 16 Template::Provider::__ANON__('Template::Context=HASH(0x233ba38)') called at d:/bugzilla/Perl/site/lib/Template/Document.pm line 140 eval {...} called at d:/bugzilla/Perl/site/lib/Template/Document.pm line 138 Template::Document::process('Template::Document=HASH(0x24038d0)', 'Template::Context=HASH(0x233ba38)') called at d:/bugzilla/Perl/site/lib/Template/Context.pm line 350 eval {...} called at d:/bugzilla/Perl/site/lib/Template/Context.pm line 320 Template::Context::process('Template::Context=HASH(0x233ba38)', 'account/auth/login-small.html.tmpl') called at data\template\template\en\default\index.html.tmpl line 67 eval {...} called at data\template\template\en\default\index.html.tmpl line 16 Template::Provider::__ANON__('Template::Context=HASH(0x233ba38)') called at d:/bugzilla/Perl/site/lib/Template/Document.pm line 140 eval {...} called at d:/bugzilla/Perl/site/lib/Template/Document.pm line 138 Template::Document::process('Template::Document=HASH(0x2398c9c)', 'Template::Context=HASH(0x233ba38)') called at d:/bugzilla/Perl/site/lib/Template/Context.pm line 350 eval {...} called at d:/bugzilla/Perl/site/lib/Template/Context.pm line 320 Template::Context::process('Template::Context=HASH(0x233ba38)', 'Template::Document=HASH(0x2398c9c)') called at d:/bugzilla/Perl/site/lib/Template/Service.pm line 97 eval {...} called at d:/bugzilla/Perl/site/lib/Template/Service.pm line 94 Template::Service::process('Template::Service=HASH(0x2300460)', 'index.html.tmpl', 'undef') called at d:/bugzilla/Perl/site/lib/Template.pm line 76 Template::process('Bugzilla::Template=HASH(0x22babb4)', 'index.html.tmpl') called at D:\bugzilla\bugzilla\index.cgi line 56
Previous trace was when going to the homepage (index.cgi).
When trying to enter a new bug (without being logged), I get:
Use of uninitialized value in substitution (s///) at (eval 57) line 44.
Software error:
Use of uninitialized value in substitution (s///) at (eval 57) line 44.
at globals.pl line 111
main::warn_with_dignity('Use of uninitialized value in substitution (s///) at (eval 57...') called at (eval 57) line 44
CGI::url('Bugzilla::CGI=HASH(0x23670a4)', '-relative', 1) called at Bugzilla/Auth/Login/WWW/CGI.pm line 154
Bugzilla::Auth::Login::WWW::CGI::login('Bugzilla::Auth::Login::WWW::CGI', 2) called at Bugzilla/Auth/Login/WWW.pm line 64
Bugzilla::Auth::Login::WWW::login('Bugzilla::Auth::Login::WWW', 2) called at Bugzilla.pm line 162
Bugzilla::login('Bugzilla', 2) called at D:\bugzilla\bugzilla\enter_bug.cgi line 317
For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.
[Thu Apr 6 09:47:19 2006] enter_bug.cgi: Use of uninitialized value in substitution (s///) at (eval 57) line 44. [Thu Apr 6 09:47:19 2006] enter_bug.cgi: at globals.pl line 111 [Thu Apr 6 09:47:19 2006] enter_bug.cgi: main::warn_with_dignity('Use of uninitialized value in substitution (s///) at (eval 57...') called at (eval 57) line 44 [Thu Apr 6 09:47:19 2006] enter_bug.cgi: CGI::url('Bugzilla::CGI=HASH(0x23670a4)', '-relative', 1) called at Bugzilla/Auth/Login/WWW/CGI.pm line 154 [Thu Apr 6 09:47:19 2006] enter_bug.cgi: Bugzilla::Auth::Login::WWW::CGI::login('Bugzilla::Auth::Login::WWW::CGI', 2) called at Bugzilla/Auth/Login/WWW.pm line 64 [Thu Apr 6 09:47:19 2006] enter_bug.cgi: Bugzilla::Auth::Login::WWW::login('Bugzilla::Auth::Login::WWW', 2) called at Bugzilla.pm line 162 [Thu Apr 6 09:47:19 2006] enter_bug.cgi: Bugzilla::login('Bugzilla', 2) called at D:\bugzilla\bugzilla\enter_bug.cgi line 317
Comment 10•19 years ago
|
||
ok, so it's Bugzilla::CGI->url() which is CGI->url()
what version of CGI do you have installed?
perl -MCGI -e"print $CGI::VERSION"
do you get a warning when you run it from the command line?
perl -MCGI -w -e"print CGI->new->url(-relative => 1)"
Comment 11•19 years ago
|
||
i assume this is IIS?
Reporter | ||
Comment 12•19 years ago
|
||
Yes I use IIS (Windows 2003, so must be version 6).
CGI is version 3.15.
For the command
perl -MCGI -w -e"print CGI->new->url(-relative => 1)"
I get the error
"Use of uninitialized value in substitution (s///) at (eval 4)
line 44
Use of uninitialized value in print at -e line 1"
Reporter | ||
Comment 13•19 years ago
|
||
On my old server (Windows 2000, IIS 5), I had CGI version 3.10, and the command would return no error (result: -e).
Reporter | ||
Comment 14•19 years ago
|
||
So what to do ;-) ?
Comment 15•19 years ago
|
||
sorry, but this bug is INVALID, as it isn't a bug caused by bugzilla.
it looks like the bug was introduced in perl's CGI.pm at version 3.12 to work around an apache2 bug.
you should create a bug via perlbug (see http://rt.perl.org/perlbug/) to let the CGI guys know about this issue.
this should fix it:
--- CGI-3.15.pm 2006-04-06 22:54:00.000000000 +0800
+++ CGI-3.15-fixed.pm 2006-04-06 22:54:17.812500000 +0800
@@ -2657,6 +2657,7 @@
$url = $uri;
}
+ $url ||= '';
$url .= $path if $path_info and defined $path;
$url .= "?$query_str" if $query and $query_str ne '';
@@ -2771,7 +2772,9 @@
my $raw_path_info = $ENV{PATH_INFO} || '';
my $uri = $ENV{REQUEST_URI} || '';
- if ($raw_script_name =~ m/$raw_path_info$/) {
+ if ($raw_script_name ne $raw_path_info
+ && $raw_script_name =~ m/$raw_path_info$/
+ ) {
$raw_script_name =~ s/$raw_path_info$//;
}
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago → 19 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 16•19 years ago
|
||
It looks like the patch is working. Thx a million!!!
I will open a bug on Perl site as suggested.
Comment 17•19 years ago
|
||
*** Bug 334831 has been marked as a duplicate of this bug. ***
Comment 18•19 years ago
|
||
*** Bug 337990 has been marked as a duplicate of this bug. ***
Comment 19•18 years ago
|
||
*** Bug 344419 has been marked as a duplicate of this bug. ***
Comment 21•18 years ago
|
||
Sorry for the dup guys - searched for the error and didnt see it :-)
Comment 22•18 years ago
|
||
If Yann or anybody has a link or bug# to the corresponding bug that Yann was going to create in the perl bug tracker please let us know so we can track this issue.
Reporter | ||
Comment 23•18 years ago
|
||
perl #38865
FYI, this happens still with ActiveState latest build 5.8.8 build 820.
Comment 25•17 years ago
|
||
At this link:
http://rt.perl.org/rt3/Public/Bug/Display.html?id=38865
is the patch as a .zip file that you can download cgi v 3.15 with the patch applied for iis that was
mentioned in this bug report. This download will save you trying to
manually apply the patch. I have tested this under iis 5.1 and iis 6
and it works and gets rid of the errors. If you are using bugzilla
under windows and active perl, assuming you have active perl already
installed, simply extract the files/folders from the zip file then
copy all files and folders to c:\perl\lib (assuming active perl is
installed to your c: drive) and answer yes to overwrite everything in
the c:\perl\lib folder to apply this fix. Then you will no longer get
the error mentioned here that iis is raising. I am running bugzilla 3,
ActivePerl-5.8.8.820-MSWin32-x86-274739.msi with the patch applied, and mysql-essential-
5.0.45-win32.msi under windows xp pro, windows server 2000, and 2003
with no errors raised from iis 5 or iis 6 after applying this patch.
Comment 26•17 years ago
|
||
Created
http://rt.cpan.org/Ticket/Display.html?id=31510
for similar bug but on linux/apache
Comment 27•17 years ago
|
||
For the record, bugs which introduced cgi.url(Relative => 1) in Bugzilla are bug 325079 and bug 276565. If we can come with an equivalent solution which doesn't use cgi.url(), this would be great. Meanwhile, I emailed the maintainer of CGI.pm directly to report this problem. There are already many tickets filed about this problem, but they got no traction at all.
Comment 28•17 years ago
|
||
(In reply to comment #27)
> Meanwhile, I emailed the maintainer
> of CGI.pm directly to report this problem. There are already many tickets filed
> about this problem, but they got no traction at all.
The maintainer quickly fixed the bug I reported to him and released CGI.pm 3.33 on January 3 with this fix in it:
http://search.cpan.org/src/LDS/CGI.pm-3.33/Changes
So upgrade to CGI 3.33 and you will no longer get this error.
You need to log in
before you can comment on or make changes to this bug.
Description
•