|
Posted by Max Belushkin on 11/05/05 20:22
On Saturday 05 November 2005 17:49, James Benson wrote:
> > I've had a different set of scripts employing a different "func.php".
> > However, in both of those, mquery() is defined. But
> > they do *not* include anything else, and the
> So you defined mquery() in both files and one include's or require's the
> other file?
I'm sorry, but what wasn't clear in my post? A *separate* set of scripts
includes a *separate* "func.php", and even not by relative, but by absolute
paths! Example:
/home/test1/index.php:
<?php include ("/home/test1/func.php"); ?>
/home/test2/index.php:
<?php include ("/home/test2/func.php"); ?>
Both func.php are the same, defining a function mquery, which connects to
mysql, and returns.
After working with the index.php in Test1 until I get the "Cannot redefine
error", I go to test2, and I get the error that *that function was defined
in /home/test1/func.php". Test1, while I'm in Test2, and that never ever ever
ever (...) includes *anything* from Test1. So the *Test1* func.php is still
sitting somewhere in memory in the thread test2 is being loaded on - thus,
include_once does not help, as the test2 func.php is NOT included. The weird
thing is, $inc_done isn't defined either for the PHP thread, as when I tried
the piece of code I quoted in my last message, the include_once still went
through.
How can this be happening? I do not know, but since a downgrade to 4.4.0
fixed it all back proper, I am seriously beginning to suspect a problem or
undocumented (widely documented, at least) change in PHP 4.4.1 on FreeBSD
ports.
Navigation:
[Reply to this message]
|