php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72687 "/" no more pointing to root directory
Submitted: 2016-07-27 14:34 UTC Modified: 2016-07-27 16:15 UTC
From: marc dot lazzaro at st dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 7.0.9 OS: Windows 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
50 - 28 = ?
Subscribe to this entry?

 
 [2016-07-27 14:34 UTC] marc dot lazzaro at st dot com
Description:
------------
include ("/test.php") throws this warning:"failed to open stream: No such file or directory in D:\root\subdir\myfile.php"
and also this one: Failed opening '/test.php' for inclusion (include_path='.;D:\root') in D:\root\subdir\myfile.php

This issue appeared when upgrading from PHP 7.0.2 to 7.0.8(22/06/16) keeping php.ini unchanged. I had to replace by include ($_SERVER['DOCUMENT_ROOT']."test.php") to recover normal behavior.

Test script:
---------------
<?php
include ("/test.php");

or
include_once ("/test.php");

or
require_once ("/test.php");

?>

Expected result:
----------------
Is this a bug?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-27 16:15 UTC] ab@php.net
-Status: Open +Status: Not a bug
 [2016-07-27 16:15 UTC] ab@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

A path like /file.txt is relative to the CWD drive root. Say, if CWD is c:\hello, then \file.txt will resolve to c:\file.txt.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 09:01:28 2024 UTC