php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71542 disk_total_space does not work with relative paths
Submitted: 2016-02-07 12:54 UTC Modified: -
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: tonybogdanov at gmail dot com Assigned:
Status: Open Package: Apache2 related
PHP Version: 5.6.18 OS: Windows 10 x64
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2016-02-07 12:54 UTC] tonybogdanov at gmail dot com
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Nov 13 17:01:31 2019 UTC