#27891 [Opn-Fbk]: Bad behavior of require() function and relative paths with IIS

2005-07-30 Thread sniper
 ID:   27891
 Updated by:   [EMAIL PROTECTED]
 Reported By:  faraco dot phpbugs at mailnull dot com
-Status:   Open
+Status:   Feedback
 Bug Type: IIS related
 Operating System: win32
 PHP Version:  5CVS, 4CVS (2005-06-19)
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2005-05-17 22:54:53] faraco dot phpbugs at mailnull dot com

The problem persists.



[2005-05-17 16:46:44] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-05-16 22:34:47] faraco dot phpbugs at mailnull dot com

Another way to explain the problem...

Following de example above:

1. when I require 'lib/functions.php', the file is first looked in my
domain document root ['docroot/lib/'] and then in my actual path
['subroot/lib'] because if I delete the first directory, the same
script finds the second directory;

2. Yes, my 'include_path' is set to '.';

3. Again, ISAPI Caching is disabled.



[2005-05-16 22:07:13] faraco dot phpbugs at mailnull dot com

I've disabled ISAPI cache and the problem persists.



[2004-09-24 18:35:46] kj at legalizer dot dk

What if you turn off ISAPI caching?



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27891

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


#27891 [Opn-Fbk]: Bad behavior of require() function

2005-05-17 Thread sniper
 ID:   27891
 Updated by:   [EMAIL PROTECTED]
 Reported By:  faraco dot phpbugs at mailnull dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Windows NT4 SP6
 PHP Version:  5.0.4
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2005-05-16 22:34:47] faraco dot phpbugs at mailnull dot com

Another way to explain the problem...

Following de example above:

1. when I require 'lib/functions.php', the file is first looked in my
domain document root ['docroot/lib/'] and then in my actual path
['subroot/lib'] because if I delete the first directory, the same
script finds the second directory;

2. Yes, my 'include_path' is set to '.';

3. Again, ISAPI Caching is disabled.



[2005-05-16 22:07:13] faraco dot phpbugs at mailnull dot com

I've disabled ISAPI cache and the problem persists.



[2005-01-10 15:11:38] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-09-24 18:35:46] kj at legalizer dot dk

What if you turn off ISAPI caching?



[2004-04-06 15:21:29] faraco dot phpbugs at mailnull dot com

Here is the confirmation of the bug. Changing index.php to:
?
echo realpath(../lib/functions.php).br;
echo realpath(lib/functions.php);
?

Expected result is:
E:\docroot\lib\functions.php
E:\docroot\subroot\lib\functions.php

While actual result is:
E:\docroot\lib\functions.php
E:\docroot\lib\functions.php



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27891

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


#27891 [Opn-Fbk]: Bad behavior of require() function

2005-01-10 Thread sniper
 ID:   27891
 Updated by:   [EMAIL PROTECTED]
 Reported By:  faraco dot phpbugs at mailnull dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Windows NT4 SP6
 PHP Version:  5CVS-2004-04-15
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-09-24 18:35:46] kj at legalizer dot dk

What if you turn off ISAPI caching?



[2004-04-06 15:21:29] faraco dot phpbugs at mailnull dot com

Here is the confirmation of the bug. Changing index.php to:
?
echo realpath(../lib/functions.php).br;
echo realpath(lib/functions.php);
?

Expected result is:
E:\docroot\lib\functions.php
E:\docroot\subroot\lib\functions.php

While actual result is:
E:\docroot\lib\functions.php
E:\docroot\lib\functions.php



[2004-04-06 15:10:20] faraco dot phpbugs at mailnull dot com

The same script runs perfectly on PHP 4.3.4.



[2004-04-06 14:55:53] faraco dot phpbugs at mailnull dot com

Sorry. I mistyped the Actual Result. The correct message is:
PHP Fatal error: Cannot redeclare anyfunction() (previously declared
in
E:\docroot\lib\functions.php:4) in E:\docroot\lib\functions.php on
line 7



[2004-04-06 14:54:18] faraco dot phpbugs at mailnull dot com

Description:

I have the following file structure (folders in uppercase for better
understanding):

DOCROOT
 |
 +- LIB
 |   |
 |   +- functions.php
 |
 +- SUBROOT
 |
 +- index.php
 |
 +- LIB
 |
 +- functions.php


The 'index.php' file uses the require() function to include both
'functions.php' files (that have different contents). When running
'index.php', a Cannot redeclare function error occurs.
Pay attention at the error message: the compiler says that the same
function is redeclared in the same file on different lines!

Reproduce code:
---
DOC_ROOT/LIB/functions.php
--
?
echo Here is DOCROOT\\LIB\\functions.phpbr;

function anyfunction($param)
{
return $param;
}
?


DOCROOT/SUBROOT/LIB/functions.php
-
?
echo Here is DOCROOT\\SUBROOT\\LIB\\functions.phpbr;
?


DOC_ROOT/SUBROOT/LIB/index.php
--
?
require(../lib/functions.php);
require(lib/functions.php);

echo anyfunction(Hello World!);
?


Expected result:

Here is DOCROOT\LIB\functions.php
Here is DOCROOT\SUBROOT\LIB\functions.php
Hello World!


Actual result:
--
Here is DOCROOT\LIB\functions.php
PHP Fatal error: Cannot redeclare anyfunction() (previously declared in
C:\doc_root\lib\functions.php:4) in E:\doc_root\lib\functions.php on
line 7 





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


#27891 [Opn-Fbk]: Bad behavior of require() function

2004-04-09 Thread sniper
 ID:   27891
 Updated by:   [EMAIL PROTECTED]
 Reported By:  faraco dot phpbugs at mailnull dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Windows NT4 SP6
 PHP Version:  5.0.0RC1
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-04-06 15:21:29] faraco dot phpbugs at mailnull dot com

Here is the confirmation of the bug. Changing index.php to:

?

echo realpath(../lib/functions.php).br;

echo realpath(lib/functions.php);

?



Expected result is:

E:\docroot\lib\functions.php

E:\docroot\subroot\lib\functions.php



While actual result is:

E:\docroot\lib\functions.php

E:\docroot\lib\functions.php



[2004-04-06 15:10:20] faraco dot phpbugs at mailnull dot com

The same script runs perfectly on PHP 4.3.4.



[2004-04-06 14:55:53] faraco dot phpbugs at mailnull dot com

Sorry. I mistyped the Actual Result. The correct message is:

PHP Fatal error: Cannot redeclare anyfunction() (previously declared
in

E:\docroot\lib\functions.php:4) in E:\docroot\lib\functions.php on

line 7



[2004-04-06 14:54:18] faraco dot phpbugs at mailnull dot com

Description:

I have the following file structure (folders in uppercase for better
understanding):



DOCROOT

 |

 +- LIB

 |   |

 |   +- functions.php

 |

 +- SUBROOT

 |

 +- index.php

 |

 +- LIB

 |

 +- functions.php





The 'index.php' file uses the require() function to include both
'functions.php' files (that have different contents). When running
'index.php', a Cannot redeclare function error occurs.

Pay attention at the error message: the compiler says that the same
function is redeclared in the same file on different lines!

Reproduce code:
---
DOC_ROOT/LIB/functions.php

--

?

echo Here is DOCROOT\\LIB\\functions.phpbr;



function anyfunction($param)

{

return $param;

}

?





DOCROOT/SUBROOT/LIB/functions.php

-

?

echo Here is DOCROOT\\SUBROOT\\LIB\\functions.phpbr;

?





DOC_ROOT/SUBROOT/LIB/index.php

--

?

require(../lib/functions.php);

require(lib/functions.php);



echo anyfunction(Hello World!);

?



Expected result:

Here is DOCROOT\LIB\functions.php

Here is DOCROOT\SUBROOT\LIB\functions.php

Hello World!



Actual result:
--
Here is DOCROOT\LIB\functions.php

PHP Fatal error: Cannot redeclare anyfunction() (previously declared in
C:\doc_root\lib\functions.php:4) in E:\doc_root\lib\functions.php on
line 7 





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