#38423 [Fbk->Opn]: unexpected warning with file_exists() and open_base_dir

From: Date: Fri, 11 Aug 2006 11:02:35 +0000
Subject: #38423 [Fbk->Opn]: unexpected warning with file_exists() and open_base_dir
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100688@lists.php.net to get a copy of this message
ID: 38423 User updated by: lars at schafft dot org Reported By: lars at schafft dot org -Status: Feedback +Status: Open Bug Type: Safe Mode/open_basedir Operating System: Linux SuSE 9.2 PHP Version: 5.1.4 New Comment: /opt/cms is a symlink, that´s right. But that didn´t cause any warnings prior to PHP 5.1 Previous Comments: ------------------------------------------------------------------------ [2006-08-11 10:32:39] tony2001@php.net The /opt or /opt/cms directory is a symlink, right? ------------------------------------------------------------------------ [2006-08-11 10:30:52] lars at schafft dot org Description: ------------ Trying to check if a file to include exists. Path, where file to be checked, is in open_base_dir. But if the file does not exists, the function throws a warning concerning open_basedir restrictions Reproduce code: --------------- if (file_exists('/opt/cms/modules/stats/frontend/stats.parser.html.class.php')) { echo 'found'; } Expected result: ---------------- file_exists() returns false without a warning Actual result: -------------- Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/opt/cms/modules/stats/frontend/stats.parser.html.class.php) is not within the allowed path(s): (/srv/www/htdocs/web2:/usr/lib/php:/opt/cms ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38423&edit=1

« previous php.bugs (#100688) next »