Reputation: 75
This is an error that I'm finding difficult to debug because
I don't experience it on my local development platform, only on remote servers (but not all) and
I'm not sure where to start looking or what PHP settings to investigate although I suspect the issue is to do with the remote server environment.
An additional complication is that, in the large multi-modular script I've developed, the problem only ever occurs in connection with implementation of tinyMCE. A typical problem is:
Warning: include_once(core/startup/GLOBALS.php) [function.include-once]: failed to open stream: No such file or directory in /home/wikindx/www/www/wikindx4/core/tiny_mce/plugins/wikindxLink/dialog.php on line 33
So in addition to a possible solution to be found in the server environment settings, I might need to change something in the tinyMCE settings -- I've asked several times for help on the tinyMCE forums, but have received no responses.
This all works fine on my local platform and on other remove servers. Needless to say, GLOBALS.php
is in core/startup/ but I cannot hard-code it to be found in /home/wikindx/www/www/wikindx4/core/startup/
instead because these scripts must work on any server.
EDIT: I really suspect it has something to do with the tinyMCE environment because the server installation causing the problem has no problem whatsoever calling include_once(core/startup/GLOBALS.php
) when that call is outside the tinyMCE system. Something in tinyMCE changes the path that include_once()
looks for.
Upvotes: 3
Views: 725
Reputation: 16113
I think you are looking for $_SERVER['DOCUMENT_ROOT']
:
include_once $_SERVER['DOCUMENT_ROOT'].'core/startup/GLOBALS.php';
On your current server that will have the value /home/wikindx/www/www/wikindx4/
Upvotes: 2