# Problem with php_value open_basedir and apache containers

- Thread: https://externals.io/message/63939
- Original archive: https://news-web.php.net/php.internals/63939
- Started by Alain Williams on 2012-11-16T18:27:48+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #63939 — Alain Williams — 2012-11-16T18:27:48+00:00

URL: https://externals.io/message/63939#63939

I have just run into this, there is a much earlier similar issue in Apache bugzilla
where they refer the problem php:

    https://issues.apache.org/bugzilla/show_bug.cgi?id=24120


In the apache config file I have the something like the following in a virtual
host definition:

    php_value open_basedir "/var/www/InternalFacing/:/usr/share/pear:/usr/local/php"

    <Directory "/var/www/InternalFacing/html/MyHidden">
        php_value open_basedir "/var/www/InternalFacing/:/usr/share/pear:/usr/local/php:/var/somewhere/"
    </Directory>

A php script inside /var/www/InternalFacing/html/MyHidden cannot open files
under /var/somewhere/. If I comment out the first 'php_value' (ie outside the
<Directory> container) it works ... but not if I leave it in.

So: it seems that 'php_value open_basedir' does not interact properly with
apache containers.

I am using httpd 2.2.15 and php 5.3.3 on a Centos 6 system.

Regards

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h
