ID: 27146
Updated by: [EMAIL PROTECTED]
Reported By: omich at artofaktur dot de
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: DebianLinux www 2.4.23-1-686-smp
PHP Version: 4.3.4
New Comment:
Fix your include_path.
Previous Comments:
------------------------------------------------------------------------
[2004-02-04 11:19:25] omich at artofaktur dot de
Description:
------------
A script 'A', which 'include's a php script file 'X'
from a subfolder of the php.ini-include path, does work
fine, but the exact same copy of the script of 'A' (call
it 'B') in a different folder does not include the file
'X' at all.
Example here: www.dannemann.com/info.php shows the
environment. The script 'A' is
www.dannemann.com/de/kompetenz/lexikon/search.php
the script 'B' is
www.dannemann.com/at/kompetenz/lexikon/search.php
Both load file 'X' which is located in
www.dannemann.com/global/dict.php
from the global folder, but only in 'de' the include
works, not in 'at'.
In the given code I have replaced the flawed include
command with a hack:
eval (substr (implode ('', file ($DOCUMENT_ROOT.'/
global/dict.php')), 2, -2));
and this works!
We use output buffering before this code and fetched the
output and transparent php sessions without cookies (see
phpinfo-output). Although we use APC-Cache we disabled
it for testing - to no avail even without APC the
include fails...
Thank you for your patience...
Reproduce code:
---------------
// this is the calling code
...
// dict-lookup
$hits_per_page = 10;
include ('gobal/dict.php');
$arr = split ($dictsep, $search);
foreach ($arr as $token) {
...
Expected result:
----------------
dict.php cotains two arrays of key-value pairs and looks
like this:
<?
$dictsep = "[ \t\n\r<>,.:\(\)]";
$dict = array (
"ich",
"du",
"er",
"sie",
...
?>
These variables should be visible to the calling script,
which is for 'at' not the case.
Actual result:
--------------
The two 'imported' variables $dictsep and $dict are not
even set (isset on both resulted in false) for 'at'.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27146&edit=1