|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-09-04 08:50 UTC] Sjon at react dot nl
Description:
------------
when open_basedir is set to / disk_total_space('/') returns false; even though the documentation states:
if set, limits all file operations to the defined directory and below
Shouldn't 'open_basedir=/' behave like 'open_basedir=' ?
Reproduce code:
---------------
[sjon@spider010 ~]$ php -r 'var_dump(disk_total_space("/"));' -d open_basedir=
float(99999830016)
[sjon@spider010 ~]$ php -r 'var_dump(disk_total_space("/"));' -d open_basedir=/
bool(false)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 13:00:01 2025 UTC |
Are you really using PHP 5.2.4? I get this: # php -n -dopen_basedir="/" -r 'var_dump(disk_total_space("/"));' float(76318621696)Yes, definitely. Might this be related to Suhosin-Patch, that the package-creator decided to include? [sjon@sjon ~]$ php -v PHP 5.2.4 with Suhosin-Patch 0.9.6.2 (cli) (built: Sep 2 2007 12:29:31) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies [sjon@sjon ~]$ php -r 'var_dump(disk_total_space("/"));' -dopen_basedir=/ bool(false) [sjon@sjon ~]$ php -r 'var_dump(disk_total_space("/"));' -dopen_basedir= float(99996684288)