Use of uninitialized value $_[0] in pattern match (m//) at /usr/share/perl5/Geo/IPfree.pm line 80.

Bug #336554 reported by Ralf Hildebrandt on 2009-03-02
8
Affects Status Importance Assigned to Milestone
awstats (Debian)
Fix Released
Unknown
awstats (Ubuntu)
Low
Kees Cook
Jaunty
Low
Kees Cook
Karmic
Low
Kees Cook

Bug Description

% /usr/lib/cgi-bin/awstats.pl -config=awstats -update > /dev/null

Use of uninitialized value $_[0] in pattern match (m//) at /usr/share/perl5/Geo/IPfree.pm line 80.

# lsb_release -rd
/usr/bin/lsb_release:81: DeprecationWarning: the sets module is deprecated
  import sets
Description: Ubuntu jaunty (development branch)
Release: 9.04

# apt-cache policy libgeo-ipfree-perl
libgeo-ipfree-perl:
  Installiert: 0.4-1
  Kandidat: 0.4-1
  Versions-Tabelle:
 *** 0.4-1 0
        500 http://de.archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status

IMPACT: every execution of awstats spews warnings (filling logs, cron email, etc)
ADDRESSED: fixed in Debian to correctly initialize Geo::IPfree
PATCH: attached
REGRESSION POTENTIAL: very low: 1 line patch to correct the initialization
TEST CASE:
 sudo apt-get -y install awstats libgeo-ipfree-perl
 sudo sed -i -e 's/^#LoadPlugin="geoipfree"/LoadPlugin="geoipfree"/' /etc/awstats/awstats.conf
 sudo sed -i -e 's/^SiteDomain=""/SiteDomain="localhost"/' /etc/awstats/awstats.conf
 /usr/lib/cgi-bin/awstats.pl -config=awstats -update > /dev/null
expected output: (none)
currently:
 Use of uninitialized value $_[0] in pattern match (m//) at /usr/share/perl5/Geo/IPfree.pm line 80.

Brian Cassidy (brian-cassidy) wrote :

This is actually a bug with awstats. Specifically the geoipfree plugin.

Line 54 calls:

$gi = Geo::IPfree::new();

It should really be

$gi = Geo::IPfree->new();

Kees Cook (kees) on 2009-05-09
affects: libgeo-ipfree-perl (Ubuntu) → awstats (Ubuntu)
Changed in awstats (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Kees Cook (kees) wrote :

Fixed in Karmic with 6.9~dfsg-1

Changed in awstats (Ubuntu Karmic):
status: Confirmed → Fix Released
Changed in awstats (Ubuntu Jaunty):
assignee: nobody → Kees Cook (kees)
importance: Undecided → Low
status: New → Triaged
Kees Cook (kees) wrote :
description: updated
Martin Pitt (pitti) wrote :

Accepted awstats into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in awstats (Ubuntu Jaunty):
status: Triaged → Fix Committed
tags: added: verification-needed
Rene Ramprecht (r-ramprecht) wrote :

After fixing
$gi = Geo::IPfree::new();
to
$gi = Geo::IPfree->new();

in /usr/share/awstats/plugins/geoipfree.pm on line 53

no more errors appeared in my logfiles

thanks a lot for fixing

Martin Pitt (pitti) wrote :

Rene, anyone else, can you please test the update in jaunty-proposed and check if it still works, and fixes this bug? Thank you!

Kees Cook (kees) on 2009-08-13
Changed in awstats (Ubuntu Karmic):
assignee: nobody → Kees Cook (kees)
Kees Cook (kees) on 2009-08-13
description: updated
Brian Murray (brian-murray) wrote :

Using Jaunty Jackalope I was able to recreate this bug using awstats version awstats_6.7.dfsg-5.1. Then after installing awstats from Jaunty proposed, 6.7.dfsg-5.1ubuntu0.1, the bug was resolved.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package awstats - 6.7.dfsg-5.1ubuntu0.1

---------------
awstats (6.7.dfsg-5.1ubuntu0.1) jaunty-proposed; urgency=low

  * Add 1011_geoipfree.patch: fix geoipfree warnings backported
    from Debian (LP: #336554, debian bug 512373).

 -- Kees Cook <email address hidden> Sat, 09 May 2009 13:10:26 -0700

Changed in awstats (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Changed in awstats (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.