473,545 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

open_basedir leaking between virtual hosts

I am setting open_basedir to include only the DocumentRoot and PHP
installation tree in 16 out of 18 VirtualHosts on our (test) apache
server. This is running apache 2.0.53 and PHP 5.0.3. If I force a
graceful restart, then fetch a trivial PHP page containing little more
than a single call to phpinfo(); from each host, I get the correct
value reported for open_basedir from the first few requests, then the
value seems to cycle round the value expected for the first 5
VirtualHosts - I presume that each pre-forked process that apache uses
is hanging on to its value of open_basedir even though it is next used
to serve a page from a different VirtualHost.

This appears to have been reported many times in previous versions of
PHP and has always been classified as a bogus error report, so I hope
it is simpy a configuration error on my part. Can anybody suggest where
to look?

Configuration details follow...

T.I.A. Chris Ritson.

Apache configured with:-
./configure --prefix=${PREFIX }/httpd/${vHTTPD} \
--enable-layout=Apache \
--enable-modules="so" \
--enable-mods-shared="ssl,rew rite,auth_diges t,dav"

PHP configured with:-
./configure --prefix=${PREFIX }/php/${vPHP} \
--with-config-file-path=${PREFIX}/php \
--with-apxs2=${APACHE}/bin/apxs \
--with-pear \
--with-dom=/usr/lib \
--with-ldap \
--with-mysql=${MYSQL} \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-zlib-dir=/usr/lib \
--with-xpm-dir \
--with-ttf \
--with-freetype-dir=/usr/lib \
--enable-gd-native-ttf

Apache httpd.conf typically contains the following for each
VirtualHost. The LoadModule for php is outside all VirtualHost blocks.

<VirtualHost *:80>
ServerAdmin cs**********@nc l.ac.uk
DocumentRoot /export/web/parallelism
ServerName www.parallelism-test.cs.ncl.ac.uk
ErrorLog /var/log/www/parallelism.cs-error_log
CustomLog /var/log/www/parallelism.cs-access_log common
php_admin_value open_basedir
/export:/export/web/parallelism:/addon/local/php
php_admin_flag safe_mode off
</VirtualHost>

php.ini contains

open_basedir = none

Thanks for reading the rest...

Chris Ritson (Computing Officer and School Safety Officer)

Rm 618, Claremont Bridge, EMAIL: C.********@ncl. ac.uk
School of Computing Science, PHONE: +44 191 222 8175
University of Newcastle, FAX : +44 191 222 8232
Newcastle on Tyne, UK NE1 7RU. http://www.cs.ncl.ac.uk/

Jul 17 '05 #1
0 1408

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2730
by: Achim Domma | last post by:
Hi, on a virtual host, I get the following warning: Warning: is_file() : open_basedir restriction in effect. File(/usr/local/httpd/htdocs/kunden/web46/html/images/1041.jpg) is not within the allowed path(s): (/usr/local/httpd/htdocs/kunden/web46/) in /srv/www/htdocs/web46/html/jobholder/userdata.php on line 105
7
20779
by: Paul | last post by:
Hi Im testing a script to see if it works in different situations and open_basedir is one of them. However if i turn it On all i get is errors Warning: Unknown(): open_basedir restriction in effect. File(c:\web\httpdocs\session.php) is not within the allowed path(s): (1) in Unknown on line 0 Warning:...
3
4621
by: Alvaro G Vicario | last post by:
This is the open_basedir restriction of my site: php_admin_value open_basedir /tmp/:/home/site/ All my PHP files are under /home/site/htdocs. However, I get lots of errors like: Warning: open_basedir restriction in effect. File is in wrong directory in /home/site/.......
2
6912
by: Brandons of mass destruction | last post by:
I'm trying to turn off open_basedir, and according to php.info, I've managed to do that in the master value column, by editing the php.ini file. But it's still on as local value for several domains, and I don't know where turn it off. does anyone?
3
2025
by: andy | last post by:
Hi, I'm trying to get mod_python working on my web server, but I'm running into problems, possibly due to having virtual hosts configured. I'm no apache guru (newbie is more accurate!) so I could easily be doing something wrong. The apache configuration is further complicated by having an include file for each virtual host, so the config...
0
2340
by: jeff.battle | last post by:
I'm trying to get PEAR DB to work on my machine at serverbeach but I'm getting the following error: Warning: main(): open_basedir restriction in effect. File(/usr/share/pear/DB.php) is not within the allowed path(s): (/home/httpd/vhosts/adapttosolve.com/httpdocs:/tmp) in... phpinfo() says I have the following open_basedir values set:...
7
3008
by: Bob | last post by:
I'm using PHP 5.1.1 with Apache 2.0.54 and several virtual hosts. PHP is installed as a module. I've created a very simple test page containing <?php phpinfo(); ?> and placed it at the doc root of three of my hosts. The main site hosted by Apache executes the page perfectly and displays the expected output. None of my virtual hosts,...
34
18159
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow "127.0.0.1". 4. Authentication: "Anonymous access" only. 5. Outbound connection listen to TCP 25. Besides,
6
15039
by: lawrence k | last post by:
If I ssh to my server and look at the php.ini file, it apears that open_basedir is off: ; open_basedir, if set, limits all file operations to the defined directory ; and below. This directive makes most sense if used in a per- directory ; or per-virtualhost web server configuration file. This directive is ; *NOT* affected by whether Safe...
0
7484
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7675
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7928
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7440
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5997
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5344
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3470
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
726
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.