Last Comment Bug 390148 - [Windows] Prevent Bugzilla from throwing warnings if we're on IIS
: [Windows] Prevent Bugzilla from throwing warnings if we're on IIS
Status: RESOLVED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Bugzilla-General (show other bugs)
: 3.0
: All Windows XP
: -- normal (vote)
: Bugzilla 3.0
Assigned To: Max Kanat-Alexander
: default-qa
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-30 07:59 PDT by Max Kanat-Alexander
Modified: 2008-08-07 04:36 PDT (History)
4 users (show)
mkanat: approval+
mkanat: approval3.0+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
v1 (1.09 KB, patch)
2007-07-30 08:56 PDT, Max Kanat-Alexander
glob: review+
Details | Diff | Splinter Review

Description Max Kanat-Alexander 2007-07-30 07:59:02 PDT
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).
Comment 1 Max Kanat-Alexander 2007-07-30 08:56:22 PDT
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.
Comment 2 Byron Jones ‹:glob› [PTO until 2017-01-09] 2007-07-30 18:00:27 PDT
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
Comment 3 Max Kanat-Alexander 2007-07-30 18:11:44 PDT
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
Comment 4 David McMinn 2008-08-07 04:36:04 PDT
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.

Note You need to log in before you can comment on or make changes to this bug.