#19650 [Fbk->Opn]: 4.2.3 (!) "include" operator mistake

From: Date: Mon, 30 Sep 2002 11:28:36 +0000
Subject: #19650 [Fbk->Opn]: 4.2.3 (!) "include" operator mistake
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-20765@lists.php.net to get a copy of this message
 ID:               19650
 User updated by:  dmitry@koteroff.ru
 Reported By:      dmitry@koteroff.ru
-Status:           Feedback
+Status:           Open
 Bug Type:         Unknown/Other Function
 Operating System: Windows
 PHP Version:      4.2.3
 New Comment:

Version
http://snaps.php.net/win32/php4-win32-latest.zip

STILL DOES NOT WORK (z:/test.php contains "echo '!'"):

Z:\!distrib\aaa>php.exe
<?
include "z:/test.php";
?>
^Z
!

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

Warning: main(/test.php) [http://www.php.net/function.main]: failed to
create stream:
No such file or directory in Z:\!distrib\aaa\- on line 2

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


Previous Comments:
------------------------------------------------------------------------

[2002-09-28 23:01:54] sniper@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip

------------------------------------------------------------------------

[2002-09-28 11:23:53] dmitry@koteroff.ru

I'm trying to write here again (maybe previous thread is down?). You
said before this bug in NOT actual in 4.2.3, but code STILL DOES NOT
work in 4.2.3.

So, PHP v4.2.0 (and later) on 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.

Again, 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. 
Please help (our clients are very angry!)

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.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=19650&edit=1



Thread (13 messages)

« previous php.bugs (#20765) next »