PHP: valid open_basedir path

I have several is_dirpage calls . They always worked without problems.

A few days ago, the hosting company updated PHP from 5.2 to 5.3. Since then, all my calls is_dirhave led to the following error (message):

Warning: is_dir(): open_basedir restriction in effect.
File(/home/virtual/domain.com/public_html/galleries/img/002.JPG/)
is not within the allowed path(s):
(/home/virtual/domain.com:/home/virtual/_tmp)
in /home/virtual/domain.com/public_html/index.php on line 201

It puzzles me.

Obviously, according to the error message (s php_info), the directory /home/virtual/domain.com(without the trailing slash, including the included subdirectories) is included / included in open_basedir, and the files that it is_dirtries to iterate over all those located in subfolders in this folder. So why are they not within acceptable paths? Clearly they are!

Oddly enough, this error only appears when it is_dirreturns false, i.e. when the file is not a folder, but a regular file. It seems that iterating over directories is all right without errors.

A similar question posed earlier here: Open_basedir odd restriction (no solution found).

Does anyone have any ideas?

(Note: Changing PHP settings is not an option, as it is a shared host and I do not have administrator access)

+5
source share
2 answers

PHP , , , . /home/virtual/domain.com/public_html/galleries/img/002.JPG / ( ).

, : " . , (, ), .", , , .

PHP:

+4

, , :

() - , img/002.JPG/ . . , (, , ), ( arent).

PHP, is_dir() TRUE, ; FALSE , , (img/002.JPG/ doesnt).

, , FALSE , PHP 5.2, , ... .

+3

All Articles