Hello!

I have installed an OpenBSD server with postfix MTA and I am trying to have
mailgraph work.
I used the "pkg_add" command to add the mailgraph software.

The script cgi script is installed in the default chroot apache:
/var/www/cgi-bin/mailgraph/mailgraph.cgi

I have defined the correct directory values in the cgi file.

When I go the the web page I get this error:


Can't load

'/usr/local/libdata/perl5/site_perl/i386-openbsd/auto/RRDs/RRDs.so' for
module RRDs: Cannot load specified object at
/usr/libdata/perl5/i386-openbsd/5.8.8/DynaLoader.pm line 230.
at /cgi-bin/mailgraph/mailgraph.cgi line 7
Compilation failed in require at /cgi-bin/mailgraph/mailgraph.cgi line 7.
BEGIN failed--compilation aborted at /cgi-bin/mailgraph/mailgraph.cgi line
7.
[Sat Jan  6 15:28:33 2007] [error] [client 192.168.0.100] Premature end of
script headers: /cgi-bin/mailgraph/mailgraph.cgi

The actual perl modules are copied in the chroot environment:
# ls -al
/var/www/usr/local/libdata/perl5/site_perl/i386-openbsd/auto/RRDs/RRDs.so
-rwxr-xr-x  1 root  bin  123336 Jan  4 07:13
/var/www/usr/local/libdata/perl5/site_perl/i386-openbsd/auto/RRDs/RRDs.so
# ls -al /var/www/usr/libdata/perl5/i386-openbsd/5.8.8/DynaLoader.pm
-r--r--r--  1 root  wheel  28125 Jan  3 23:41
/var/www/usr/libdata/perl5/i386-openbsd/5.8.8/DynaLoader.pm

# more /var/www/cgi-bin/mailgraph/mailgraph.cgi
#!/usr/bin/perl -w

# mailgraph -- a postfix statistics rrdtool frontend
# copyright (c) 2000-2005 David Schweikert <dws AT ee POINT ethz.ch>
# released under the GNU General Public License

use RRDs;
use POSIX qw(uname);

my $VERSION = "1.12";

my $host = (POSIX::uname())[1];
my $scriptname = 'mailgraph.cgi';
my $xpoints = 540;
my $points_per_sample = 3;
my $ypoints = 160;
my $ypoints_err = 96;
my $rrd = '/mailgraph/mailgraph.rrd'; # path to where the RRD database is
my $rrd_virus = '/mailgraph/mailgraph_virus.rrd'; # path to where the Virus RRD
database is
my $tmp_dir = '/mailgraph'; # temporary directory where to store the
images


Line 7 is the RRDs perl module...it is installed.

I did some googling and found this:
http://archives.neohapsis.com/archives/openbsd/2006-12/0404.html
The solution was to add /usr/X11R6/lib/ to ldconfig...

Here is my rc.conf.local:
shlib_dirs="/usr/X11R6/lib/"                    # extra directories
for ldconfig, separated

Then I copied /usr/X11R6/lib/ in the apache chroot:
# cp -r /usr/X11R6/lib/ /var/www/usr/X11R6/lib/

Still doesn't work.

anyone got any ideas on my probleme?

Thank you very much for your help.

Reply via email to