ID:               29170
 Comment by:       kuba at 3net dot pl
 Reported By:      phynias at camphreaks dot com
 Status:           Open
 Bug Type:         PHP options/info functions
 Operating System: Redhat 9
 PHP Version:      5.0.0
 New Comment:

the same story....
when this issue will be solved?
do i have to change my software, install old php 4.3.7,
or wait for you to solve it?


Previous Comments:
------------------------------------------------------------------------

[2004-07-15 00:39:59] phynias at camphreaks dot com

Description:
------------
When open_basedir options or set on a a set within apache.
Such as:
php_admin_value open_basedir"/home/httpd/vhosts/mysite.com/httpdocs"

If I do an include form 1 page and then in that page inlcude another
page it errors out with 
open_basedir restriction in effect.

Easiest way to test it is to do the following.
in your docroot create a file called test.php inside test.php put <?
include('inc/include1.php');?>
then inside include1.php put
<? include('inc2/include2.php'); ?>
and inside include2.php put
<? print "hello world"; ?>

So if yer vase was /httpd/docroot you would have

/httpd/docroot/test.php
/httpd/docroot/inc/include1.php
/httpd/docroot/inc/inc2/include2.php

Then bring up test.php in your browser.


Of course u must have the dirs /inc and inc/inc2 created
This will include the first file but error on the second one.

Actual result:
--------------
Warning: main() [function.main]: open_basedir restriction in effect.
File(/usr/share/pear/include/inc2.php) is not within the allowed
path(s): (/home/httpd/vhosts/mysite.com/httpdocs:/tmp) in
/home/httpd/vhosts/mysite.com/httpdocs/test/inc.php on line 2

Warning: main(include/inc2.php) [function.main]: failed to open stream:
Operation not permitted in
/home/httpd/vhosts/mysite.com/httpdocs/test/inc.php on line 2

Warning: main() [function.include]: Failed opening 'include/inc2.php'
for inclusion (include_path='.:./:/usr/share/pear:/php/includes:') in
/home/httpd/vhosts/mysite.com/httpdocs/test/inc.php on line 2


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29170&edit=1

Reply via email to