Koozali.org: home of the SME Server

Installation of phpPrintAnalyzer for CUPS

Offline amazilia

  • *
  • 36
  • +0/-0
Installation of phpPrintAnalyzer for CUPS
« on: June 24, 2008, 06:48:41 PM »
Hi,

phpprintanalyzer is a really nice graphic interface for cups log

Sorry it is not an automatic installation but it works fine

make sure you do not have PrintAnalyzer or at least that you removed the logrotate for /var/log/cups/page_log

1. get the files
   phpprintanalyzer  ---> http://phpprintanalyze.sourceforge.net/
   jpgraph  ---> http://www.aditus.nu/jpgraph/jpdownload.php use the 1.x version as the newest version is not compatible with SME
   msttcorefonts I do not now if it is native to sme as it was already on the server I am using

2. install everything inside /home/e-smith/files/primary/html/
   cd /home/e-smith/files/primary/html/
   mkdir /home/e-smith/files/primary/html/truetype/
   wget http://switch.dl.sourceforge.net/sourceforge/phpprintanalyze/phpPrintAnalyzer-1.2.tar.gz
   wget http://hem.bredband.net/jpgraph/jpgraph-1.22.1.tar.gz
   tar xvzf jpgraph-1.22.1_php4.tar.gz
   tar xvzf phpPrintAnalyzer-1.2.tar.gz
   cp -r  /usr/share/fonts/truetype/msttcorefonts /home/e-smith/files/primary/html/truetype/

3. create a link for /var/log/cups/page_log
   vi  /etc/e-smith/templates/etc/cups/cupsd.conf/20LogFilePerm
      LogFilePerm 0644
      instead of
      LogFilePerm 0600
   chmod 644 /var/log/cups/page_log
   ln  /var/log/cups/page_log /home/e-smith/files/primary/html/page_log

[modification]
so apparently I am not supposed to do that. I will look into that, but if someone is willing to give the proper answer, this person is welcome
[/modification]

   you should be able to see the file in your web browser http://server_address/page_log
   
4. modify jpgraph
    vi /home/e-smith/files/primary/html/jpgraph-1.22.1/src/jpg-config.inc.php
      DEFINE("TTF_DIR","/home/e-smith/files/primary/html/truetype/msttcorefonts/");
      instead of
      // DEFINE("TTF_DIR","/usr/X11R6/lib/X11/fonts/truetype/");
   check with the example in the jpgraph folder that everything works.
   
5. modify phpprintanalyzer
   vi /home/e-smith/files/primary/html/phpPrintAnalyzer/inc/config.inc.php
      $rep_jpgraph                    =       "/home/e-smith/files/primary/html/jpgraph-1.22.1/src";
      $tab_fic_page_log               =       array("/home/e-smith/files/primary/html/page_log");
   modify then what you want in the options, such as the cost of printing


It should work via http://server_address/phpPrintAnalyzer

Philippe
« Last Edit: June 24, 2008, 06:54:14 PM by amazilia »

Offline e[nt]e

  • *
  • 172
  • +0/-0
Re: Installation of phpPrintAnalyzer for CUPS
« Reply #1 on: June 24, 2008, 06:54:20 PM »
3. create a link for /var/log/cups/page_log
   vi  /etc/e-smith/templates/etc/cups/cupsd.conf/20LogFilePerm
      LogFilePerm 0644
      instead of
      LogFilePerm 0600
   chmod 644 /var/log/cups/page_log
   ln  /var/log/cups/page_log /home/e-smith/files/primary/html/page_log
   you should be able to see the file in your web browser http://server_address/page_log

Please notice my post in the other thread and according to this modify your instructions
http://forums.contribs.org/index.php?topic=37748.msg192972#msg192972

Oh too late...saw your edit
« Last Edit: June 24, 2008, 06:56:07 PM by e[nt]e »
1984 wasn't meant to be a manual.

Offline amazilia

  • *
  • 36
  • +0/-0
Re: Installation of phpPrintAnalyzer for CUPS
« Reply #2 on: June 24, 2008, 06:55:34 PM »
Please notice my post in the other thread and according to this modify your instructions
http://forums.contribs.org/index.php?topic=37748.msg192972#msg192972
Hi,

I was correcting my post accordingly  :-P

thanks

Philippe