Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

php_value error_log realtive path in 5.2.8

11 views
Skip to first unread message

Andre Hübner

unread,
Jan 12, 2009, 4:06:04 AM1/12/09
to php-g...@lists.php.net
Hi,

please can someone try to add a logging with .htaccess and use a relative
path to logfile? I always get an open_basedir error...

open_basedir and document_root of domain points to: /path/path/
In /path/path/ is located the .htaccess with:
php_flag log_errors on
php_value error_log subpath/logfile.txt
(logfile.txt is writeable)

It just only works if path to logfile.txt is given absolut as
/path/path/subpath/logfile.txt
The relative path works reproducable in php 5.2.6
Please can somebody confirm this behavior? May be a kind of bug? This
behavior seems to be new to me...


Thanks,
Andre

Nathan Rixham

unread,
Jan 12, 2009, 5:19:43 AM1/12/09
to Andre Hübner, php-g...@lists.php.net

have you checked that you're php 5.2.8 is definately using the correct
php.ini?

Nathan Rixham

unread,
Jan 12, 2009, 5:43:08 AM1/12/09
to Andre Hübner, PHP-General
Andre Hübner wrote:
>
> ----- Original Message ----- From: "Nathan Rixham" <nri...@gmail.com>
> To: "Andre Hübner" <andre....@gmx.de>
> Cc: <php-g...@lists.php.net>
> Sent: Monday, January 12, 2009 11:19 AM
> Subject: Re: php_value error_log realtive path in 5.2.8
> yes, my php.ini should not be the problem
> with php 5.2.6 i use the same version cause im my own packager.
>
> Thanks,
> Andre
>
>
sorry going through the obvious ones -
a: is the log file path ../subpath/logfile.txt
b: what happens if you set it to ./subpath/logfile.txt
c: check the values when you get_cfg_var() / ini_get() the values in
question

Nathan Rixham

unread,
Jan 12, 2009, 7:13:20 AM1/12/09
to Andre Hübner, PHP-General
Andre Hübner wrote:
>
> ----- Original Message ----- From: "Nathan Rixham" <nri...@gmail.com>
> To: "Andre Hübner" <andre....@gmx.de>
> Sent: Monday, January 12, 2009 12:18 PM

> Subject: Re: php_value error_log realtive path in 5.2.8
>
>
>> Andre Hübner wrote:
>>>
>>> ----- Original Message ----- From: "Nathan Rixham" <nri...@gmail.com>
>>> To: "Andre Hübner" <andre....@gmx.de>; "PHP-General"
>>> <php-g...@lists.php.net>
>>> Sent: Monday, January 12, 2009 11:43 AM
>>> interesting...
>>> a/b. with ../subpath/logfile.txt ./subpath/logfile.txt and
>>> subpath/logfile.txt i get open_basedir restriction.
>>> c: the interesting part. if i use relative path in .htaccess the
>>> ini_get("error_log") is completly empty
>>> a value is only shown when used a absolut path, but in error_log i
>>> can see the path whcih is used in .htaccess
>>> strange case... what do you think?
>>>
>>>
>>>
>>>
>>>
>> what about when you do a phpinfo().. whats the val under error_log
>> local and master?
>> +upgrading to 5.2.8 locally to see if i can replicate
>
> sorry, forget about CVE-2007-3378, is not changed in current version.
> my mistake, im sorry...
>
>
>
you'll be perhaps glad to know that I've replicated it identically over
here; PHP 5.2.8 on windows vista with apache 2.2.10

may be worth noting that if you add the lines to your vhosts.conf file
instead under each vhost it works fine; however definately only absolute
paths allowed in .htaccess when using open_basedir

I'll post on internals for confirmation and get back to you

regards, nath

qwee...@gmail.com

unread,
Aug 24, 2012, 3:12:17 PM8/24/12
to Andre Hübner, php-g...@lists.php.net
привет
0 new messages