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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: marc dot lazzaro at st dot com
New email:
PHP Version: OS:

 

 [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: Fri Apr 26 04:01:30 2024 UTC