Ok, I did a little test and here's the problem:
include() parses the included file and makes it part of the current script.
That means that the current working path of the included script becomes the same as the calling script.
So if I have
docs/html/index.php
docs/html/a/a.php
docs/html/b/b.php
and I want to include a.php in index.php:
include("a/a.php");
And if I want to include b.php in a.php: include("../b/b.php");
now here's the kicker, if I call a.php from index.php, the CWD for a.php becomes / not a
so if a.php then tries to include b.php, it tries to go to ../b from /docs/html/
that means it looks for b.php in /docs/ (!)
So, don't use relative paths.
Instead, use a config file or a constant to define the "root" directory.