Online Advertising - Travel and Leisure Articles - Buy WoW Gold - Music Store - Deaf Topics

PDA

View Full Version : open_basedir restriction although it's set correctly


fanatique
Jan 5th 2006, 4:13 am
hello everybody,

i've got a problem that drives me nuts. trying to exceute mkdir() returns the following error message:
Warning: mkdir(): open_basedir restriction in effect. File(/var/www/virtual/xxx/dev/htdocs/osp/output/brbr)
is not within the allowed path(s): (/home/virtual/xxx/dev/:/usr/share/php/:/tmp/:/var/www/virtual/xxx/dev/htdocs/osp/output/)
in /home/virtual/xxx/dev/htdocs/brbr.php on line 2

the strange thing is that both the php file and the directory i'm trying to create are within that path.

any hint or idea would be highly appreciated! thank you.

some additional facts:
it's my own dedicated server running php 4.3, apache 2, vhcs 2.4 (software for administration).

phpinfo() returns the right paths as open_basedir

the folder virtual is placed in /home. /var/www/virtual is nothing but a SymLink. the FollowSymLink option is activated for the VirtualHost and it's working fine as other scripts are running perfectly.

Big 'G'
Jan 5th 2006, 6:58 am
CHMOD Maybe

fanatique
Jan 5th 2006, 7:08 am
that's a good one but i really tried everything.

chmod 777 -R osp/
chown -R www-data osp/
chgrp -R www-data osp/

n0other
Jan 5th 2006, 8:47 am
Hi. From the manual:

When a script tries to open a file with, for example, fopen() or gzopen(), the location of the
file is checked. When the file is outside the specified directory-tree,
PHP will refuse to open it. All symbolic links are resolved,
so it's not possible to avoid this restriction with a symlink.


http://lt.php.net/features.safe-mode

Good luck.

fanatique
Jan 5th 2006, 11:17 am
your quote sounds really interesting. the link suggests that it describes the behaviour when safe_mode is on and i switched it off - for test purposes.

php_admin_flag safe_mode Off