Note: There are a few cases of duplicates in user autocompletion which are being worked on.

[Windows] Prevent Bugzilla from throwing warnings if we're on IIS

RESOLVED FIXED in Bugzilla 3.0

Status

()

Bugzilla
Bugzilla-General
RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: Max Kanat-Alexander, Assigned: Max Kanat-Alexander)

Tracking

Bugzilla 3.0
All
Windows XP
Bug Flags:
approval +
approval3.0 +

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
Some people run Bugzilla on IIS, on Windows. IIS has no concept of "stderr", so it just prints warnings out onto the page. Mostly, this is just confusing and irritating for admins and users, particularly since ActiveState throws lots of "unreferenced scalar" warnings.

There's probably some way to figure out what server we're running on, and disable warnings if we're on IIS, but just installing an empty $SIG{__WARN__} handler (or installing one that prints specifically to data/error_log or something like that).
(Assignee)

Comment 1

10 years ago
Created attachment 274469 [details] [diff] [review]
v1

This seems to work for me. I haven't actually tested it on IIS, but I tested it without the enclosing "if" on Apache and it worked just fine.
Assignee: general → mkanat
Status: NEW → ASSIGNED
Attachment #274469 - Flags: review?(bugzilla)
Comment on attachment 274469 [details] [diff] [review]
v1

>+    if ($ENV{SERVER_SOFTWARE} && $ENV{SERVER_SOFTWARE} =~ /microsoft-iis/) {

needs to be case insensitive.  SERVER_SOFTWARE on iis7 is "Microsoft-IIS/7.0"

>+            if (-w "$datadir/warning_log") {

as it's windows let's make the log file warning.log


r=glob with these fixed on check in
Attachment #274469 - Flags: review?(bugzilla) → review+
(Assignee)

Comment 3

10 years ago
Ah, yeah, thanks for the reminder about the /i. :-) I forgot. :-)

I made it into data/errorlog instead, actually, because we already use that for something, so I figured we'd just re-use it.

LpSolit: I think this is a small change for a big gain, so I also checked it into the 3.0 branch. It shouldn't affect QA.

tip:

Checking in Bugzilla.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla.pm,v  <--  Bugzilla.pm
new revision: 1.58; previous revision: 1.57
done

3.0:

Checking in Bugzilla.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla.pm,v  <--  Bugzilla.pm
new revision: 1.55.2.2; previous revision: 1.55.2.1
done
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Flags: approval3.0+
Flags: approval+
Resolution: --- → FIXED
Summary: Prevent Bugzilla from throwing warnings if we're on IIS → [Windows] Prevent Bugzilla from throwing warnings if we're on IIS

Comment 4

9 years ago
This was supposed to be fixed in Bugzilla 3.0.1 but when using Bugzilla 3.0.4, IIS 5.1, Windows XP Pro SP3 and ActivePerl 5.8.8 I get the following warnings on the front page:

[Thu Aug  7 12:27:09 2008] index.cgi: Use of uninitialized value in substitution (s///) at (eval 44) line 44.
[Thu Aug  7 12:27:09 2008] index.cgi: Use of uninitialized value in substitution (s///) at (eval 44) line 44.
[Thu Aug  7 12:27:09 2008] index.cgi: Use of uninitialized value in substitution (s///) at (eval 44) line 44.
You need to log in before you can comment on or make changes to this bug.