Cheshire Cat Computing

Software support and information
It is currently Tue Jun 18, 2013 6:13 pm

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Jul 09, 2004 11:42 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
This is a device-level extension that uses the htmldoc command to generate an Adobe PDF file report of all of the monthly/yearly graphs for the current device. You can then download this or print it, and display it in the browser plugin.

I developed this one for the benefit of management here, who want their monthly reports in PDF format.

Again, this is beta, and requires the htmldoc to be installed. I don't know if it works under Windows yet. Email me for a copy.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
 Post subject: pdfreport.cgi
PostPosted: Wed Dec 15, 2004 12:17 pm 
Offline
User

Joined: Wed Dec 15, 2004 11:56 am
Posts: 3
I have tried to get the pdfreport.cgi to work. I have installed the htmldoc. All I get when I try the pdfreport icon is:
Content-Type: text/plain

HTMLDOC Version 1.8.24 Open Source Copyright 1997-2004 Easy Software Products, All Rights Reserved.
This software is governed by the GNU General Public License, Version 2, and
is based in part on the work of the Independent JPEG Group.

This is on a Red Hat 7.3 server with the latest rrdtool,mrtg,&routers2.

Any help would be apreciated.
Royce


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 15, 2004 1:25 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
You seem to have a slightly more recent version of HTMLDOC than we do (we have 1.8.23) but that should not make any difference.

The output you are describing is what htmldoc outputs when it gets invalid input. There are a couple of possibilities:

1) the 1.8.24 version has different parameters, and my script gives the wrong options. Unlikely since it is only a 3rd level change, but I'll upgrade and test.
2) the parameters at the top of the pdfreport.cgi script are invalid somehow. Please check the script has been configured right:
Code:
# Configure here
my( $HTMLDOC ) = "/usr/bin/htmldoc"; # location of htmldoc executable
my( $ROUTERSCGI ) = "/u01/www/cgi-bin/routers2.cgi"; # location of routers2.cgi
my( $WORKDIR ) = "/tmp";             # temporary work directory
my( $WEBROOT ) = "/u01/www/html";    # docroot for your web server
my( $CONFPATH ) = "/u01/mrtg/conf";  # default path for cfg files

these should be set to appropriate paths and locations for your system.
3) The directories are unwriteable
Make sure the web user can write to WORKDIR and WEBROOT.
4) Something else...
Are there any other indications as to the cause? Does the page have more text (maybe giving error messages?) other than what you give above? Can you also check the web server error log to seeif anything is being produced on stderr that may be of help?

Finally, of course it works here (else I would not have released it) but clearly it doesn't work everywhere. Can anyone who is using it successfully please let me know they configuration as confirmation?

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 16, 2004 3:30 am 
Offline
User

Joined: Wed Dec 15, 2004 11:56 am
Posts: 3
When I look in the error log this is what I get:

main::readcfgfile() called too early to check prototype at /var/www/cgi-bin/pdfreport.cgi line 87.
main::readcfgfile() called too early to check prototype at /var/www/cgi-bin/pdfreport.cgi line 87.
Use of uninitialized value in undef operator at /var/www/cgi-bin/pdfreport.cgi line 115.
HTMLDOC(11792) INFO: HTMLDOC 1.8.24 Open Source starting in CGI mode.
HTMLDOC(11792) INFO: TMPDIR is "(null)"

I have checked the permissions on the folders and the web user has the write permissions on both the temp and web doc root.

I am still a beginner when looking at perl, so I am kind of lost with this.

Thanks for the help.

Royce


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 16, 2004 9:12 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
This is a great help. Keep an eye out for an updated version out soon that should fix this -- looks like its seeking TMPDIR in the environment for some reason, but I can check for that and set it if necessary.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 04, 2005 12:39 am 
Offline
User

Joined: Tue Jan 04, 2005 12:30 am
Posts: 8
I downloaded Routers2.cgi version 2.15 today hoping to use the pdf export functionality but I am getting the same errors like rsherm with HTMLDOC v1.8.24 on RedHat EL 3.0. Was this bug fixed per your last message in this topic or the update is still pending?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 04, 2005 5:41 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
This one wasn't fixed as I couldn't duplicate it. Also, I've had a bit of extra work the last few weeks (see the info in the CHANGES file for some details) I'll be updating the plugins semi-independently to the main program.

One thing to try is to make sure that your web server user has TMPDIR set, since it seems to be sometimes required.

I'll add more to the code to force it :(. Follow this thread for notification of when I have an update.

Would any of you guys volunteer to test a fixed version of pdfreport.cgi?

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 04, 2005 7:51 pm 
Offline
User

Joined: Tue Jan 04, 2005 12:30 am
Posts: 8
stevesh wrote:
Would any of you guys volunteer to test a fixed version of pdfreport.cgi?


I wouldn't mind testing fixed pdfreport.cgi. Please let me know through email when it's available and I'll be glad to be a beta tester :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 6:07 am 
Offline
User

Joined: Wed Dec 15, 2004 11:56 am
Posts: 3
I would be interested in being a tester. just tell me where to d/l the code. rsherm


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 9:50 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
Modify pdfreport.cgi as shown here:

Quote:
# Set up the command line parameters for htmldoc
# Force certain environment thingies
$ENV{TMPDIR} = $tdir;
$ENV{TMP} = $tdir;

$cmd = "$HTMLDOC --webpage --no-links --no-strict --color -t pdf --quiet --path $WEBROOT ".(join " ",@files);


This should force the environment settings for TMPDIR (and TMP as well in case it is being used). Please let me know if this fixes anything...

(It seems easier to give instructions here than upload a whole new version)

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group