LxCenter HyperVM & Kloxo Support

Forum



Members   Search      Help    Register    Login    Home
Home » Archive » LxAdmin » Bug Report » PHP Log
PHP Log [message #48643] Wed, 03 December 2008 04:32 Go to next message
Yokav is currently offline Yokav  Belgium
Messages: 247
Registered: August 2007
Location: Be
Senior Member

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 Go to previous messageGo to next message
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 #48685 is a reply to message #48643] Wed, 03 December 2008 10:50 Go to previous messageGo to next message
Yokav is currently offline Yokav  Belgium
Messages: 247
Registered: August 2007
Location: Be
Senior Member

It's the case, before the php logs work fine.
In Server -> PHP Config -> Log errors is enable.
Re: PHP Log [message #48700 is a reply to message #48685] Wed, 03 December 2008 11:32 Go to previous messageGo to next message
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 Go to previous messageGo to next message
Yokav is currently offline Yokav  Belgium
Messages: 247
Registered: August 2007
Location: Be
Senior Member

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 Go to previous messageGo to next message
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 #48713 is a reply to message #48643] Wed, 03 December 2008 12:12 Go to previous messageGo to next message
Yokav is currently offline Yokav  Belgium
Messages: 247
Registered: August 2007
Location: Be
Senior Member

Yes sorry, I'm looking at the wrong place.

I've no *.phplog:
root@omega [~]# find /home -name *.phplog
root@omega [~]#

[Updated on: Wed, 03 December 2008 12:14]

Report message to a moderator

Re: PHP Log [message #48715 is a reply to message #48713] Wed, 03 December 2008 12:18 Go to previous messageGo to next message
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 Go to previous messageGo to next message
Yokav is currently offline Yokav  Belgium
Messages: 247
Registered: August 2007
Location: Be
Senior Member

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 Go to previous messageGo to next message
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 #48725 is a reply to message #48643] Wed, 03 December 2008 12:31 Go to previous messageGo to next message
Yokav is currently offline Yokav  Belgium
Messages: 247
Registered: August 2007
Location: Be
Senior Member

Yes as I said before:

In Server -> PHP Config -> Log errors is enable.
Re: PHP Log [message #48726 is a reply to message #48725] Wed, 03 December 2008 12:34 Go to previous messageGo to next message
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 Go to previous messageGo to next message
Yokav is currently offline Yokav  Belgium
Messages: 247
Registered: August 2007
Location: Be
Senior Member

I'm trying with this which must generate en error into logs I think (may depend on the level of the error):

<?php

echo "hello

?>


after that:
root@omega [~]# find /home -name *.phplog
root@omega [~]# 

Re: PHP Log [message #48820 is a reply to message #48643] Thu, 04 December 2008 05:03 Go to previous messageGo to next message
koyot  Poland
Messages: 43
Registered: June 2008
Location: Poland
Member
Hi

I have the same problem
Empty PHP Log.
Re: PHP Log [message #50178 is a reply to message #48643] Fri, 12 December 2008 05:06 Go to previous messageGo to next message
Yokav is currently offline Yokav  Belgium
Messages: 247
Registered: August 2007
Location: Be
Senior Member

Could we have more informations Lxhelp, have you made some tests?
Re: PHP Log [message #50290 is a reply to message #48820] Fri, 12 December 2008 20:16 Go to previous messageGo to next message
k0nan is currently offline k0nan  Italy
Messages: 495
Registered: May 2008
Master
koyot wrote on Thu, 04 December 2008 11:03

Hi

I have the same problem
Empty PHP Log.



me too

also, they are not even more loged in /tmp, where they was before


An LxLabs satisfied customer
Re: PHP Log [message #51192 is a reply to message #50290] Mon, 22 December 2008 09:59 Go to previous messageGo to next message
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 Go to previous messageGo to next message
Yokav is currently offline Yokav  Belgium
Messages: 247
Registered: August 2007
Location: Be
Senior Member

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 Go to previous messageGo to next message
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 #51221 is a reply to message #51192] Mon, 22 December 2008 11:26 Go to previous messageGo to next message
k0nan is currently offline k0nan  Italy
Messages: 495
Registered: May 2008
Master
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.


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.





no

apache + suPHP but still empty folder for php error log

may i help you with other additional info ?

regards


An LxLabs satisfied customer
Re: PHP Log [message #51225 is a reply to message #51221] Mon, 22 December 2008 11:34 Go to previous messageGo to next message
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

 
 error_log
 


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 Go to previous messageGo to next message
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 #53297 is a reply to message #53201] Sun, 11 January 2009 09:03 Go to previous messageGo to next message
k0nan is currently offline k0nan  Italy
Messages: 495
Registered: May 2008
Master
hi

php.ini settings are ok, simply the log is not written anywhere

suphp and perms are ok


An LxLabs satisfied customer
Re: PHP Log [message #54811 is a reply to message #48643] Fri, 30 January 2009 07:09 Go to previous messageGo to next message
Yokav is currently offline Yokav  Belgium
Messages: 247
Registered: August 2007
Location: Be
Senior Member

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 #55116 is a reply to message #54811] Wed, 04 February 2009 11:29 Go to previous messageGo to next message
k0nan is currently offline k0nan  Italy
Messages: 495
Registered: May 2008
Master
suphp

perms ok
php.ini ok

and still does not loggin

regards


An LxLabs satisfied customer
Re: PHP Log [message #58232 is a reply to message #48643] Wed, 04 March 2009 09:36 Go to previous messageGo to next message
techfiz is currently offline techfiz  India
Messages: 14
Registered: March 2006
Location: India
Member

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 Go to previous messageGo to next message
Yokav is currently offline Yokav  Belgium
Messages: 247
Registered: August 2007
Location: Be
Senior Member

But in our htaccess we have :

php_flag log_errors  on


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 #58250 is a reply to message #48643] Wed, 04 March 2009 10:34 Go to previous messageGo to next message
techfiz is currently offline techfiz  India
Messages: 14
Registered: March 2006
Location: India
Member

Yes, you got it right!

Regards,
TechFiz :::eXcluding eRrors:::
Blog: http://platonic.techfiz.info
Re: PHP Log [message #58271 is a reply to message #48643] Wed, 04 March 2009 13:49 Go to previous messageGo to next message
Yokav is currently offline Yokav  Belgium
Messages: 247
Registered: August 2007
Location: Be
Senior Member

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 Go to previous messageGo to next message
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 #58383 is a reply to message #48643] Thu, 05 March 2009 05:17 Go to previous messageGo to next message
techfiz is currently offline techfiz  India
Messages: 14
Registered: March 2006
Location: India
Member

LxHelp,

That didn't work. You might want to check the options once again.

I'm running latest version of LxAdmin on few boxes here.


Regards,
TechFiz :::eXcluding eRrors:::
Blog: http://platonic.techfiz.info
Re: PHP Log [message #78410 is a reply to message #48643] Mon, 27 December 2010 11:45 Go to previous message
ppnl is currently offline ppnl  Netherlands
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

Previous Topic:Domainkey Mix-Up (frequent but random bug :-( )
Next Topic:glibc detected *** double free or corruption (fasttop): 0x080728d0 ***
Goto Forum:
  


Current Time: Sat May 25 08:27:46 EDT 2013

Total time taken to generate the page: 0.01646 seconds
.:: Contact :: Home :: Privacy ::.

Click here to lend your support to: LxCenter and make a donation at www.pledgie.com !

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software