ID:               27146
 User updated by:  omich at artofaktur dot de
 Reported By:      omich at artofaktur dot de
-Status:           Feedback
+Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: DebianLinux www 2.4.23-1-686-smp
 PHP Version:      4.3.4
 New Comment:

error_reporting (E_ALL) showed no errors.
var_dump(ini_get('include_path'))
shows the expected result
string(18) "/var/www/dannemann"
but it does not work!


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

[2004-02-04 19:16:37] [EMAIL PROTECTED]

Put "error_reporting(E_ALL);" as first line on all files related. And
also "var_dump(ini_get('include_path'));".
You propably have some .htaccess files or vhost setting the include
path to something else..


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

[2004-02-04 14:05:27] omich at artofaktur dot de

Any other idea or feedback is welcomed...

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

[2004-02-04 14:02:52] omich at artofaktur dot de

The include path is correct, otherwise (as state) none 
of the two script would run.

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

[2004-02-04 13:29:39] [EMAIL PROTECTED]

Fix your include_path.


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

[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

Reply via email to