| PHP Log [message #48643] |
Wed, 03 December 2008 04:32  |
|
Hello,
The php log section is always empty, I've look at some domains to be sure.
|
|
|
| Re: PHP Log [message #48668 is a reply to message #48643] |
Wed, 03 December 2008 10:32   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
You have to enable enable logging in your PHP config.
On Wed, Dec 03, 2008 at 09:32:56AM -0000, Yokav wrote:
>
>
> Hello,
>
> The php log section is always empty, I've look at some domains to be sure.
>
|
|
|
|
| Re: PHP Log [message #48700 is a reply to message #48685] |
Wed, 03 December 2008 11:32   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
So does the php log work fine now?
On Wed, Dec 03, 2008 at 03:50:31PM -0000, Yokav wrote:
>
>
> It's the case, before the php logs work fine.
> In Server -> PHP Config -> Log errors is enable.
|
|
|
| Re: PHP Log [message #48706 is a reply to message #48643] |
Wed, 03 December 2008 11:49   |
|
Yes
root@omega [~]# ls -l /var/log/httpd/
total 97332
-rw-r--r-- 1 root root 41085 Dec 3 17:46 access_log
-rw-r--r-- 1 root root 55635 Nov 30 03:46 access_log.1
-rw-r--r-- 1 root root 150283 Nov 23 03:54 access_log.2
-rw-r--r-- 1 root root 178541 Nov 16 03:10 access_log.3
-rw-r--r-- 1 root root 47118 Nov 9 03:45 access_log.4
-rw-r--r-- 1 root root 156480 Dec 3 17:46 error_log
-rw-r--r-- 1 root root 333786 Nov 30 04:02 error_log.1
-rw-r--r-- 1 root root 369254 Nov 23 04:02 error_log.2
-rw-r--r-- 1 root root 368446 Nov 16 04:02 error_log.3
-rw-r--r-- 1 root root 277810 Nov 9 04:02 error_log.4
|
|
|
| Re: PHP Log [message #48710 is a reply to message #48706] |
Wed, 03 December 2008 12:00   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
But that's not the php log. Php log is in /home/clientname/__processed_stats/domain.com.phplog
On Wed, Dec 03, 2008 at 04:49:44PM -0000, Yokav wrote:
>
>
> Yes
>
> root@omega [~]# ls -l /var/log/httpd/
> total 97332
|
|
|
|
| Re: PHP Log [message #48715 is a reply to message #48713] |
Wed, 03 December 2008 12:18   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
That's the per domain apache logs. The php logs are completely separate:
/home/clientname/__processed_logs/domain.com.phplog
You have to first enable logging.
On Wed, Dec 03, 2008 at 05:12:06PM -0000, Yokav wrote:
>
>
> Yes sorry, I'm looking at the wrong place.
>
> I've those files into a subdomain:
|
|
|
| Re: PHP Log [message #48722 is a reply to message #48643] |
Wed, 03 December 2008 12:28   |
|
Yes sorry again, i've not all my mind today.
I correct this on my previous post:
I've no *.phplog:
root@omega [~]# find /home -name *.phplog
root@omega [~]#
|
|
|
| Re: PHP Log [message #48724 is a reply to message #48722] |
Wed, 03 December 2008 12:29   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
You have enabled log errors in php config ?
On Wed, Dec 03, 2008 at 05:28:50PM -0000, Yokav wrote:
>
>
> Yes sorry again, i've not all my mind today.
>
|
|
|
|
| Re: PHP Log [message #48726 is a reply to message #48725] |
Wed, 03 December 2008 12:34   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
Yes, but your php script must also run into some warnings for them to be logged. Anyway, I will check it here.
thanks.
On Wed, Dec 03, 2008 at 05:31:26PM -0000, Yokav wrote:
>
>
> Yes as I said before:
>
> In Server -> PHP Config -> Log errors is enable.
>
|
|
|
| Re: PHP Log [message #48728 is a reply to message #48643] |
Wed, 03 December 2008 12:41   |
|
I'm trying with this which must generate en error into logs I think (may depend on the level of the error):
after that:
root@omega [~]# find /home -name *.phplog
root@omega [~]#
|
|
|
|
|
|
| Re: PHP Log [message #51192 is a reply to message #50290] |
Mon, 22 December 2008 09:59   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
Is this apache? There is a problem where the directory /home/clientname/__processed_logs/ should be writable by whatever user that the php process is running under. It shouldn't be a problem for suPHP or lighty, but could be problem for mod_php.
thanks.
On Sat, Dec 13, 2008 at 01:16:37AM -0000, k0nan wrote:
>
>
> koyot wrote on Thu, 04 December 2008 11:03
> > Hi
> >
> > I have the same problem
> > Empty PHP Log.
|
|
|
| Re: PHP Log [message #51193 is a reply to message #48643] |
Mon, 22 December 2008 10:11   |
|
True, i'm using apache / mod_php...
Actually the directory /__processed_logs/ and all the sub-directories are own by root/root so i just have to change the owner of them to clientname/clientname and it will work?!
|
|
|
| Re: PHP Log [message #51194 is a reply to message #51193] |
Mon, 22 December 2008 10:32   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
You need to chown to apache:apache
thanks.
On Mon, Dec 22, 2008 at 03:11:02PM -0000, Yokav wrote:
>
>
> True, i'm using apache / mod_php...
>
> Actually the directory /__processed_logs/ and all the sub-directories are own by root/root so i just have to change the owner of them to clientname/clientname and it will work?!
>
|
|
|
|
| Re: PHP Log [message #51225 is a reply to message #51221] |
Mon, 22 December 2008 11:34   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
If you have suPHP check the /home/httpd/domain.com/php.ini and see the line for
and find out where is it pointing to. Make sure that directory is owned by the user that PHP runs on. For suPHP it will be the same user.
thanks.
On Mon, Dec 22, 2008 at 04:26:19PM -0000, k0nan wrote:
>
>
> Lxhelp wrote on Mon, 22 December 2008 15:59
> > Is this apache? There is a problem where the directory /home/clientname/__processed_logs/ should be writable by whatever user that the php process is running under. It shouldn't be a problem for suPHP or lighty, but could be problem for mod_php.
> >
> > thanks.
> >
|
|
|
| Re: PHP Log [message #53201 is a reply to message #51225] |
Sat, 10 January 2009 12:31   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
Hello, Did this work? It should work absolutely fine for suPHP. For mod_php, it is possible it may not work at all, since I think php might ignore the directive in .htaccess.
On Mon, Dec 22, 2008 at 10:04:33PM +0530, Lxhelp wrote:
> >
> >
> > Lxhelp wrote on Mon, 22 December 2008 15:59
> > > Is this apache? There is a problem where the directory /home/clientname/__processed_logs/ should be writable by whatever user that the php process is running under. It shouldn't be a problem for suPHP or lighty, but could be problem for mod_php.
> > >
> > > thanks.
> > >
|
|
|
|
| Re: PHP Log [message #54811 is a reply to message #48643] |
Fri, 30 January 2009 07:09   |
|
Hi,
I've made a fresh installation of lxadmin. It uses php with mod_php.
I don't have a folder /home/clientname/__processed_logs/, I only have /home/clientname/__processed_stats/.
Into the .htaccess of the domains I've:
php_value error_log /home/clientname/__processed_stats/domainname.phplog
php_flag log_errors on
So my first question is: is it normal to don't have the folder __processed_logs? and my second is: why don't you chown automaticly the folder __processed_logs/stats to apache:apache when a user switch to mod_php?
edit: When the folder __processed_stats is chown to apache:apache the php logs are write correctly.
edit: I just try with suphp on another vps and there is no folder __processed_logs as for mod_php. There is no php log file generated into the folder __processed_stats.
[Updated on: Fri, 30 January 2009 07:30] Report message to a moderator
|
|
|
|
| Re: PHP Log [message #58232 is a reply to message #48643] |
Wed, 04 March 2009 09:36   |
|
Its because php.ini inside /home/httpd/domainname.com/php.ini still contains log_errors = off. Replace that with log_errors = on
If you want to fix it through out the server use my following one liner.
#!/bin/bash
for i in `find /home/httpd -name php.ini`; do replace "log_errors = off" "log_errors = on" -- $i; done
Regards,
TechFiz :::eXcluding eRrors:::
Blog: http://platonic.techfiz.info
|
|
|
| Re: PHP Log [message #58248 is a reply to message #48643] |
Wed, 04 March 2009 10:16   |
|
But in our htaccess we have :
So if changing this option into php.ini works fine, it seems that the htaccess flag for log_errors doesn't work with suphp (but works fine with mod_php).
|
|
|
|
| Re: PHP Log [message #58271 is a reply to message #48643] |
Wed, 04 March 2009 13:49   |
|
|
Thank you to have found and published this solution, maybe that lxhelp could take a look to this and fix the problem.
|
|
|
| Re: PHP Log [message #58379 is a reply to message #58271] |
Thu, 05 March 2009 05:00   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
Log errors is there in advanced php config
On Wed, Mar 04, 2009 at 06:49:19PM -0000, Yokav wrote:
>
>
> Thank you to have found and published this solution, maybe that lxhelp could take a look to this and fix the problem.
>
|
|
|
|
| Re: PHP Log [message #78410 is a reply to message #48643] |
Mon, 27 December 2010 11:45  |
ppnl  Messages: 7 Registered: November 2010 Location: Netherlands |
Member |
|
|
Still no error_log with kloxo version 6.0.2086. I've enabled global php logging in kloxo (home->php config) then I've enabled php error logging on the domain itself (script->php config). And no error log.
I did the mentioned chown command and now it's working properly. With this I can see the error log nicely via kloxo control panel (php log). However I would prefer this to be fixed, as now I have to do this manually for each (new) domain. And I'm not sure of any side-effects or security risk.
chown apache:apache /home/client_name/__processed_stats/
[Updated on: Mon, 27 December 2010 11:48] Report message to a moderator
|
|
|