Bug #71542 [NEW]: disk_total_space does not work with relative paths
| From: | tonybogdanov at gmail dot com | Date: | Sun, 07 Feb 2016 12:54:48 +0000 |
| Subject: | Bug #71542 [NEW]: disk_total_space does not work with relative paths | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-199090@lists.php.net to get a copy of this message | ||
From: tonybogdanov at gmail dot com
Operating system: Windows 10 x64
PHP version: 5.6.18
Package: Apache2 related
Bug Type: Bug
Bug description:disk_total_space does not work with relative paths
Description:
------------
When run on Windows (WAMP) with Apache (using PHP alone in a console is
fine), the function disk_total_space() throws Warning:
disk_total_space(): The system cannot find the path specified. if a
relative path is supplied.
Test script:
---------------
<?php
echo getcwd() . DIRECTORY_SEPARATOR . 'test' . PHP_EOL;
echo realpath('test') . PHP_EOL;
echo disk_total_space(getcwd() . DIRECTORY_SEPARATOR . 'test') .
PHP_EOL;
echo disk_total_space(realpath('test')) . PHP_EOL;
echo disk_total_space('test') . PHP_EOL; // fails
--
Edit bug report at https://bugs.php.net/bug.php?id=71542&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71542&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71542&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71542&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71542&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71542&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71542&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71542&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71542&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71542&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71542&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71542&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71542&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71542&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71542&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71542&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71542&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71542&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71542&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71542&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71542&r=mysqlcfg