php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19549 4.1.0 -> 4.2.2 "include" operator incompatibility
Submitted: 2002-09-22 07:13 UTC Modified: 2002-09-25 12:18 UTC
From: dmitry at koteroff dot ru Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.2.3 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dmitry at koteroff dot ru
New email:
PHP Version: OS:

 

 [2002-09-22 07:13 UTC] dmitry at koteroff dot ru
PHP v4.2.0+ (Windows):
include "/home/some/site.php";
- DOES NOT work (try to believe)! We have to use instead:
include "z:/home/some/site.php"; # bad... Bad?.. BAD!!!

Previous PHP v4.1.0:
include "/home/some/site.php";
- works correct.

I think that since 4.2.0 pathes like "/some/where" does not treated as absolute. For example, if we add "z:" to "include_path", include "/home/some/site.php" become workable - it is only the prove.

It is VERY loathsome bug, because it makes Windows scripts incompatible with Unix and with previous PHP versions.

P.S.
DocumentRoot "/home/site/www"
...
GET http://site/test.php - DOES NOT work too. It seems to me mod_php uses the same "include" function while starting the script.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-22 20:29 UTC] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 [2002-09-25 12:18 UTC] dmitry at koteroff dot ru
Unfortunately, new version (4.2.3) has THE SAME bug:

Z:\!distrib\php-4.2.3-Win32>php.exe
<?
include "/test.php";
?>
^Z

Warning: Failed opening '/test.php' for inclusion
(include_path='.;c:\php4\pear') in - on line 2

If I use "include 'z:/test.php'", it works. Help!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 20:01:31 2024 UTC