[rrd-users] Unable to specify which version of RRDs perl module to use

David Ball davidtball at gmail.com
Mon Apr 16 04:40:01 CEST 2007


   Thanks very much, Sam.  That was the ticket.  I was CERTAIN I had
tried specifying the version yesterday at some point, but obviously
hadn't done so correctly, or was being tripped up by something else.
  Thanks again.  Much appreciated.

David


On 4/15/07, Sam Umbach <sumbach at gmail.com> wrote:
> On 4/15/07, David Ball <davidtball at gmail.com> wrote:
> > use lib '/usr/local/rrdtool-1.2.19/lib/perl/5.6.1/i386-linux';
> > use RRDs;
>
> Try adding the module version number as well:
>
> use RRDs 1.2019;
> print "$RRDs::VERSION\n";
>
> That way it shouldn't matter if the old RRDs is found first.  Also,
> you'll get a descriptive error message if that version of the module
> can't be found.
>
> >    This all seems to work fine if I call my script from the command
> > line.  However, when I call it from a web form, it REFUSES to use my
> > newer RRDs.pm, and it reverts to the old version instead.  To debug, I
> > print @INC immediately after my 'use lib' statement.  Cmd line AND web
> > form invocations show that my lib path is being prepended on @INC.
> > But when called from a web form, $INC{'RRDs.pm'} is always set to the
> > OLD one.  I then added a:
> >
> > if (-r '/usr/local/rrdtool-1.2.19/lib/perl/5.6.1/i386-linux/RRDs.pm')
> >
> >   to make sure the web user (apache) can read the file, and it CAN.
> > So, I can't figure out for the LIFE of me why my script won't use the
> > newer RRDs.pm.
>
> I'm not very familiar with SELinux, but I know it's installed and
> enabled on a number of more recent Linux distros.  It is possible that
> although the process can read the file, Apache may not have the
> appropriate rights to load the file as a dynamic library.  Check
> /var/log/messages (and other logs in /var/log) for messages from
> SELinux.  If you're running a Redhat-based distro, the configuration
> is in /etc/sysconfig/selinux.  You could temporarily turn SELinux to
> permissive mode and see if your CGI script works.
>
> -Sam
>



More information about the rrd-users mailing list