php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45992 \t in include_path is parsed as tabulator
Submitted: 2008-09-04 11:45 UTC Modified: 2008-09-05 06:47 UTC
From: ckl at ecw dot de Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.3.0alpha2 OS: Windows XP SP 3
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ckl at ecw dot de
New email:
PHP Version: OS:

 

 [2008-09-04 11:45 UTC] ckl at ecw dot de
Description:
------------
I know that the include_path should contain forward slashes, but PHP 5.2.x still accepted backslashes in path.

If you use a backslash in your path, the next character is interpreted as an metachar (\trunk is interpreted as \t => tab).

Reproduce code:
---------------
include_path = ".;C:\ckl\dev\lang\php\lib\trunk"

Expected result:
----------------
echo get_include_path() => .;C:\ckl\dev\lang\php\lib\trunk

Actual result:
--------------
echo get_include_path() => .;C:\ckl\dev\lang\php\lib      runk


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-04 12:54 UTC] tularis@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

\t is still a special-character: the tab. Just like \r is a Carriage-Return and \n is a newline. It has always been this way, and is completely expected. These characters simply need to be escaped in double-quoted strings:
".;C:\\ckl\\dev\\lang\\php\\lib\\trunk"

 [2008-09-04 13:04 UTC] pajoye@php.net
Or don't use double quotes.
 [2008-09-05 06:47 UTC] ckl at ecw dot de
As I already mentioned in my initial post, I know that backslashes shouldn't be used - but this was possible till 5.2.6. Is that a bug in 5.2.6 that backslashes are *not* interpreted as a beginning for a coming meta character?

To summarize:
PHP 5.2.6:
include_path = ".;C:\ckl\dev\lang\php\lib\trunk"
get_include_path = ".;C:\ckl\dev\lang\php\lib\trunk"
( WRONG )

PHP 
include_path = ".;C:\ckl\dev\lang\php\lib\trunk"
get_include_path = ".;C:\ckl\dev\lang\php\lib    runk"
( RIGHT )

Conclusion: include_path in 5.2.6 is not parsed correctly.
Please change the version info of this bug if you agree with me.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 23:01:33 2025 UTC