You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nick Edwards <ni...@gmail.com> on 2012/05/15 08:46:17 UTC

[users@httpd] php admin value ignored

Hi,

in httpd.conf each virtual host has
...
php_admin_value open_basedir "/usr/local/lib/php/:/srv/foo.net/"
php_admin_value upload_tmp_dir /srv/foo.net/tmp/
...

But a phpmailer script is complain

PHP Warning:  Unknown: open_basedir restriction in effect. File(/tmp)
is not within the allowed path(s):  (correct paths provied)

Anyone have any idea why php ignores the upload_tmp_dir and insists use /tmp ?

(httpd 2.4.2  + php 5.3.13)

I reaallllllllllllyyyyyyyyyyyyyyy  do not want to give each host
access to /tmp for security reasons.

Thanks
Nik

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] php admin value ignored

Posted by Nick Edwards <ni...@gmail.com>.
OMFG! thank you! the vhost log value was owne rwx------, after setting
1770, the scripts  works happily.

Thanks
Nik

On 5/16/12, Noel Butler <no...@ausics.net> wrote:
> If you have it defined to use /srv/foo.net/tmp/  and it wants to
> use /tmp  it's probably because httpd/php can't write to that directory,
> check your permissions, set 1770 on  /srv/foo.net/tmp/
>
>
> On Tue, 2012-05-15 at 17:26 +1000, Nick Edwards wrote:
>
>> Hi,
>>
>> Although I did not include it in my snippage, I already have
>> php_admin_value session.save_path /srv/foo.net/sess/
>>
>> Should it make a difference if thats not the same as tmp ?
>>
>> Thanks.
>>
>>
>>
>> On 5/15/12, Alex Domoradov <al...@gmail.com> wrote:
>> > Try to something like this
>> >
>> > php_admin_value open_basedir /usr/local/lib/php/:/srv/foo.net/
>> > php_admin_value upload_tmp_dir /srv/foo.net/tmp/
>> > php_admin_value session.save_path /srv/foo.net/tmp/
>> >
>> > On Tue, May 15, 2012 at 9:46 AM, Nick Edwards
>> > <ni...@gmail.com>
>> > wrote:
>> >> Hi,
>> >>
>> >> in httpd.conf each virtual host has
>> >> ...
>> >> php_admin_value open_basedir "/usr/local/lib/php/:/srv/foo.net/"
>> >> php_admin_value upload_tmp_dir /srv/foo.net/tmp/
>> >> ...
>> >>
>> >> But a phpmailer script is complain
>> >>
>> >> PHP Warning:  Unknown: open_basedir restriction in effect. File(/tmp)
>> >> is not within the allowed path(s):  (correct paths provied)
>> >>
>> >> Anyone have any idea why php ignores the upload_tmp_dir and insists
>> >> use
>> >> /tmp ?
>> >>
>> >> (httpd 2.4.2  + php 5.3.13)
>> >>
>> >> I reaallllllllllllyyyyyyyyyyyyyyy  do not want to give each host
>> >> access to /tmp for security reasons.
>> >>
>> >> Thanks
>> >> Nik
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> >> For additional commands, e-mail: users-help@httpd.apache.org
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> > For additional commands, e-mail: users-help@httpd.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] php admin value ignored

Posted by Noel Butler <no...@ausics.net>.
If you have it defined to use /srv/foo.net/tmp/  and it wants to
use /tmp  it's probably because httpd/php can't write to that directory,
check your permissions, set 1770 on  /srv/foo.net/tmp/


On Tue, 2012-05-15 at 17:26 +1000, Nick Edwards wrote:

> Hi,
> 
> Although I did not include it in my snippage, I already have
> php_admin_value session.save_path /srv/foo.net/sess/
> 
> Should it make a difference if thats not the same as tmp ?
> 
> Thanks.
> 
> 
> 
> On 5/15/12, Alex Domoradov <al...@gmail.com> wrote:
> > Try to something like this
> >
> > php_admin_value open_basedir /usr/local/lib/php/:/srv/foo.net/
> > php_admin_value upload_tmp_dir /srv/foo.net/tmp/
> > php_admin_value session.save_path /srv/foo.net/tmp/
> >
> > On Tue, May 15, 2012 at 9:46 AM, Nick Edwards <ni...@gmail.com>
> > wrote:
> >> Hi,
> >>
> >> in httpd.conf each virtual host has
> >> ...
> >> php_admin_value open_basedir "/usr/local/lib/php/:/srv/foo.net/"
> >> php_admin_value upload_tmp_dir /srv/foo.net/tmp/
> >> ...
> >>
> >> But a phpmailer script is complain
> >>
> >> PHP Warning:  Unknown: open_basedir restriction in effect. File(/tmp)
> >> is not within the allowed path(s):  (correct paths provied)
> >>
> >> Anyone have any idea why php ignores the upload_tmp_dir and insists use
> >> /tmp ?
> >>
> >> (httpd 2.4.2  + php 5.3.13)
> >>
> >> I reaallllllllllllyyyyyyyyyyyyyyy  do not want to give each host
> >> access to /tmp for security reasons.
> >>
> >> Thanks
> >> Nik
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >> For additional commands, e-mail: users-help@httpd.apache.org
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 



Re: [users@httpd] php admin value ignored

Posted by Nick Edwards <ni...@gmail.com>.
Hi,

Although I did not include it in my snippage, I already have
php_admin_value session.save_path /srv/foo.net/sess/

Should it make a difference if thats not the same as tmp ?

Thanks.



On 5/15/12, Alex Domoradov <al...@gmail.com> wrote:
> Try to something like this
>
> php_admin_value open_basedir /usr/local/lib/php/:/srv/foo.net/
> php_admin_value upload_tmp_dir /srv/foo.net/tmp/
> php_admin_value session.save_path /srv/foo.net/tmp/
>
> On Tue, May 15, 2012 at 9:46 AM, Nick Edwards <ni...@gmail.com>
> wrote:
>> Hi,
>>
>> in httpd.conf each virtual host has
>> ...
>> php_admin_value open_basedir "/usr/local/lib/php/:/srv/foo.net/"
>> php_admin_value upload_tmp_dir /srv/foo.net/tmp/
>> ...
>>
>> But a phpmailer script is complain
>>
>> PHP Warning:  Unknown: open_basedir restriction in effect. File(/tmp)
>> is not within the allowed path(s):  (correct paths provied)
>>
>> Anyone have any idea why php ignores the upload_tmp_dir and insists use
>> /tmp ?
>>
>> (httpd 2.4.2  + php 5.3.13)
>>
>> I reaallllllllllllyyyyyyyyyyyyyyy  do not want to give each host
>> access to /tmp for security reasons.
>>
>> Thanks
>> Nik
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] php admin value ignored

Posted by Alex Domoradov <al...@gmail.com>.
Try to something like this

php_admin_value open_basedir /usr/local/lib/php/:/srv/foo.net/
php_admin_value upload_tmp_dir /srv/foo.net/tmp/
php_admin_value session.save_path /srv/foo.net/tmp/

On Tue, May 15, 2012 at 9:46 AM, Nick Edwards <ni...@gmail.com> wrote:
> Hi,
>
> in httpd.conf each virtual host has
> ...
> php_admin_value open_basedir "/usr/local/lib/php/:/srv/foo.net/"
> php_admin_value upload_tmp_dir /srv/foo.net/tmp/
> ...
>
> But a phpmailer script is complain
>
> PHP Warning:  Unknown: open_basedir restriction in effect. File(/tmp)
> is not within the allowed path(s):  (correct paths provied)
>
> Anyone have any idea why php ignores the upload_tmp_dir and insists use /tmp ?
>
> (httpd 2.4.2  + php 5.3.13)
>
> I reaallllllllllllyyyyyyyyyyyyyyy  do not want to give each host
> access to /tmp for security reasons.
>
> Thanks
> Nik
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org