Bug #67593 [Com]: Path in require or include that has C:\e...\script.php
Edit report at https://bugs.php.net/bug.php?id=67593&edit=1
ID: 67593
Comment by: abanarn at gmail dot com
Reported by: abanarn at gmail dot com
Summary: Path in require or include that has
C:\e...\script.php
Status: Not a bug
Type: Bug
Package: Scripting Engine problem
Operating System: Windows
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
I figured I will have to update the code to use what suggested. Thanks for confirming. Cheers
Previous Comments:
------------------------------------------------------------------------
[2014-07-08 20:15:01] requinix@php.net
Yup. \e was added in 5.4.0.
Moral of the story is to not use unescaped backslashes in double-quoted strings. Escape them, or use
single-quoted strings, or use forward slashes because those work just fine even in Windows.
------------------------------------------------------------------------
[2014-07-08 18:32:12] abanarn at gmail dot com
If directory name starts with letter 'e' include or require will complain
------------------------------------------------------------------------
[2014-07-08 18:29:32] abanarn at gmail dot com
Description:
------------
Recently, I have been working on upgrading my php5.3 in my Windows servers. I have noticed that some
of the includes are failing because the path name has \e for example : C:\epo\example.php and it
thinks that "\e" is an escape code for ESC.
No issues in <= php-5.4.3
In php >= 5.4.4; I received the below:
<?php
require(C:\epo\example.php)
?>
Warning: require(C:âpo\example.php): failed to open stream: In
valid argument in C:\php\db_connection.php on line 20
Fatal error: require(): Failed opening required 'C:âpo\example.php'
Test script:
---------------
<?php
require(C:\epo\example.php)
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67593&edit=1
Thread (4 messages)