473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

open_basedir restriction

hi,

I read the section about open_basedir in the safe_mode
documentation (http://de3.php.net/features.safe-mode)
but this only confirmed my understanding of open_basedir
and didn't help understand the problem below. I tried
to search the net, but couldn't find anything yet.

here is my test-case
(with php_admin_value open_basedir /home/m2004001):

/home/m2004001/Test/test1.php:
<?php
echo "test1";
include("tmp/test2.php");
?>
/home/m2004001/Test/tmp/test2.php:
<?php
echo "test2";
include("test3.php");
?>
/home/m2004001/Test/tmp/test3.php:
<?php
echo "test3";
?>

now load test1.php in the browser and you get:
Warning: open_basedir restriction in effect. File is in wrong
directory in /home/m2004001/Test/tmp/test2.php on line 3

In my project I have all my include files in app/include, and when I
include another include-file in an include-file I omit the path (as in
the example above).

It works when I use absolute paths in include, but I don't want to
specify a path involving the DocumentRoot (in case it gets moved),
and a path like "include('/app/include/test.php')" doesn't work.

thanks,

--
Felix Natter
Jul 17 '05 #1
1 2073

this is probably bug #22101. Is there workaround (besides absolute
filesystem paths)?

--
Felix Natter
Jul 17 '05 #2

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

Similar topics

7
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...
3
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:...
2
by: Brandons of mass destruction | last post by:
I recently reconfigured open_basedir so that it wasn't quite so limited. Now, I'm getting erros with php script that use to run fine, and I can't figure out what went wrong. Previously,...
0
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...
0
by: erwinschrijver | last post by:
On a previous installed server my site which uses several PEAR-packages worked fine. Now it's transfered to a new server. (Both servers installed with Windows 2003 / IIS 6, on the previous server...
2
by: sreniaw | last post by:
Hello, I use php 5.1.4 with apache 2.2.2 on Solaris 10. The problem is that I can't configure open_basedir because I always get warming message: Warning: readfile() : open_basedir restriction...
6
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...
1
by: Markus | last post by:
Hi My ISP seems to have made a PHP version upgrade - without any change in the code, a new error occurs: PHP Warning: ftp_nlist() : open_basedir restriction in effect. File(/var/tmp/) is not...
2
by: rdlowrey | last post by:
Okay, I've tried a bunch of things on this one and can't figure it out. The line in my phpinfo: open_basedir /var/www/vhosts/mysite.com/subdomains/intranet/httpdocs:/ tmp no value Why would...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
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...

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.