Koozali.org: home of the SME Server

php access to file /var/log/cups/page_log

Offline tropicalview

  • *****
  • 196
  • +0/-0
    • http://www.tropicalview.net
php access to file /var/log/cups/page_log
« on: July 11, 2007, 03:13:27 PM »
Dear all.
A php aplication should be able to read this file:

/var/log/cups/page_log

how can i make that available for PHP?

or can i just make a shortcut (by LN) to access it?
The sky is not the limit, But when I reach the sky, for sure I will not try to go to the limit.... (donated $25,- upto now)

Offline tropicalview

  • *****
  • 196
  • +0/-0
    • http://www.tropicalview.net
LN Not allowed.
« Reply #1 on: July 13, 2007, 09:43:29 PM »
Dear all,

I tried this:

[root@studenten html]# cd printlog
[root@studenten printlog]# ln .. /var/log/cups/page_log
ln: `..': hard link not allowed for directory
[root@studenten printlog]#

So in the web dir i made a folder called printlog
and i would like to make a hard link of the log file there.

Can anybody help?

Kind Regards

Hendrik
The sky is not the limit, But when I reach the sky, for sure I will not try to go to the limit.... (donated $25,- upto now)

Offline tec

  • ***
  • 48
  • +0/-0
php access to file /var/log/cups/page_log
« Reply #2 on: July 14, 2007, 12:06:18 AM »
The Problem ist, that the PHPApplication has not the sufficient rights to read the page_log
Change the Permissions from 600 to 644 or something that reflect your need
You need to make a custom template of
/etc/e-smith/templates/etc/cups/cupsd.conf/20LogFilePerm

Maybe this helps

Offline amazilia

  • **
  • 36
  • +0/-0
Re: php access to file /var/log/cups/page_log
« Reply #3 on: June 24, 2008, 05:41:08 PM »
The Problem ist, that the PHPApplication has not the sufficient rights to read the page_log
Change the Permissions from 600 to 644 or something that reflect your need
You need to make a custom template of
/etc/e-smith/templates/etc/cups/cupsd.conf/20LogFilePerm

Maybe this helps

Hi

I do have the same problem to use phpprintanalyzer requiring to read /var/log/cups/page_log

changing /etc/e-smith/templates/etc/cups/cupsd.conf/20LogFilePerm does not seem to help

thanks for the help

Philippe

Offline amazilia

  • **
  • 36
  • +0/-0
Re: php access to file /var/log/cups/page_log
« Reply #4 on: June 24, 2008, 06:21:46 PM »
Hi

I do have the same problem to use phpprintanalyzer requiring to read /var/log/cups/page_log

changing /etc/e-smith/templates/etc/cups/cupsd.conf/20LogFilePerm does not seem to help

thanks for the help

Philippe


it works with hard link not symbolic link

1.  vi /etc/e-smith/templates/etc/cups/cupsd.conf/20LogFilePerm
Code: [Select]
LogFilePerm 0644

2. modify permission for page_log
Code: [Select]
chmod 644 /var/log/cups/page_log

3. create link for the file
Code: [Select]
ln /var/log/cups/page_log /home/e-smith/files/primary/html/page_log

and it works

Philippe

Offline e[nt]e

  • *
  • 172
  • +0/-0
Re: php access to file /var/log/cups/page_log
« Reply #5 on: June 24, 2008, 06:39:15 PM »
vi /etc/e-smith/templates/etc/cups/cupsd.conf/20LogFilePerm

The problem with this is that you should never edit a template directly but instead create a custom-template like tec mentioned in his post
You need to make a custom template of
/etc/e-smith/templates/etc/cups/cupsd.conf/20LogFilePerm

Read the Developers Manual for instructions on how to do this:
http://wiki.contribs.org/SME_Server:Documentation:Developers_Manual#Configuration_file_templates

1984 wasn't meant to be a manual.