Hi,
I improved the installation of phpPrintanalyzer, so ignore my previous message.
it is now stored in /opt
it is not yet a rpm as i do not yet know how to make them, so if you want to make one, don't hesitate.
1. install cups without printanalyzer
2. remove the logrotate for page_log
mkdir -p /etc/e-smith/templates-custom/etc/logrotate.d/cups/
vi /etc/e-smith/templates-custom/etc/logrotate.d/cups/00defineLogs
{
$OUT = '';
@logs = qw(
/var/log/cups/access_log
/var/log/cups/error_log
);
}
3. modify httpd.conf
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
vi /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/99phpPrintAnalyzer
Alias /phpPrintAnalyzer /opt/phpPrintAnalyzer
<Directory /opt/phpPrintAnalyzer>
AddType application/x-httpd-php .php .php3 .phtml
Options FollowSymLinks
AllowOverride all
order deny,allow
deny from all
allow from all
php_flag register_globals off
php_admin_flag allow_url_fopen 1
php_admin_value eaccelerator.enable 1
php_admin_value open_basedir /opt/phpPrintAnalyzer:/opt/jpgraph-1.26:/var/log/cups:/usr/share/fonts/truetype/msttcorefonts
</Directory>
Alias /jpgraph-1.26 /opt/jpgraph-1.26
<Directory /opt/jpgraph-1.26>
AddType application/x-httpd-php .php .php3 .phtml
Options FollowSymLinks
AllowOverride all
order deny,allow
deny from all
allow from all
php_flag register_globals off
php_admin_flag allow_url_fopen off
php_admin_value eaccelerator.enable 1
php_admin_value open_basedir /opt/jpgraph-1.26:/var/log/cups:/usr/share/fonts/truetype/msttcorefonts
</Directory>
4. get phpPrintAnalyzer and JPGraph
cd /opt
wget http://switch.dl.sourceforge.net/sourceforge/phpprintanalyze/phpPrintAnalyzer-1.3.tar.gz
wget http://hem.bredband.net/jpgraph/jpgraph-1.26.tar.gz
tar xvzf jpgraph-1.26.tar.gz
tar xvzf phpPrintAnalyzer-1.2.tar.gz
rm -rf *z
5. get msttcorefont
I did not see it in the official repository for sme so I got it from my ubuntu PC
mkdir -p /usr/share/fonts/truetype/msttcorefonts
cp /root/msttcorefonts/* /usr/share/fonts/truetype/msttcorefonts/
6.set-up jpgraph
vi /opt/jpgraph-1.26/src/jpg-config.inc.php
DEFINE("TTF_DIR","/usr/share/fonts/truetype/msttcorefonts/");
7. set-up phpprintanalyzer
cp /opt/phpPrintAnalyzer/inc/config.inc.php.sample /opt/phpPrintAnalyzer/inc/config.inc.php
vi /opt/phpPrintAnalyzer/inc/config.inc.php
$rep_jpgraph = "/opt/jpgraph-1.26/src";
$tab_fic_page_log = array("http://cups_server_address:631/page_log");
$serveurWebCups = "http://cups_server_address:631";
$tabCoutPageA4 = array(
"hp2200_serv" => 0.05,
// "printer_name" => page_price
);
8. link page_log to cups site
ln -s /var/log/cups/page_log /usr/share/cups/doc/
9. wrap up
expand-template /etc/httpd/conf/httpd.conf
/etc/init.d/httpd-e-smith restart
signal-event post-upgrade; signal-event reboot
I already installed it twice, it seems to work fine
Hope this help
Philippe