View Full Version : Including Global.php
MamboCube
09-14-2005, 12:07 PM
when i include this on a non vb page i get this error message
Warning: main(./includes/init.php): failed to open stream: No such file or directory in /public_html/forum/global.php on line 18
Fatal error: main(): Failed opening required './includes/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /public_html/forum/global.php on line 18
anyone know what this means and how i can fix it?
Andreas
09-14-2005, 12:14 PM
Well, it means exactly that what the error does say:
./includes/init.php was not found in ., /usr/lib/php or /usr/local/lib/php when it was called in /public_html/forum/global.php in line 18
Solution:
chdir('/public_html/forum'); <-- Is this really the full path?
MamboCube
09-14-2005, 12:41 PM
thnx for the quick reply kirby
the full path is /home/*****/public_html/forum
also where do i put chdir('/public_html/forum');
i put it under require global but then i get this error message
Fatal error: main(): Failed opening required './includes/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*****/public_html/forum/global.php on line 18
i put the full path in aswell
any ideas?
Andreas
09-14-2005, 12:55 PM
You must but it above global.php and use the full path
MamboCube
09-14-2005, 01:00 PM
like this?
chdir('home/*****/public_html/forum/');
require_once('home/*****/public_html/forum/global.php);
Andreas
09-14-2005, 01:04 PM
Not quite ...
chdir('/path/to/forum');
require_once('./global.php');
MamboCube
09-14-2005, 01:04 PM
i get this error
Fatal error: main(): Failed opening required 'home/*****/public_html/forum/global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*****/public_html/index.php on line 3
Andreas
09-14-2005, 01:06 PM
<a href="https://vborg.vbsupport.ru/showpost.php?p=772988&postcount=6" target="_blank">https://vborg.vbsupport.ru/showp...88&postcount=6</a>
With this Code?
MamboCube
09-14-2005, 01:11 PM
sorry no i didnt see that post
but when i put
chdir('home/*****/public_html/forum');
require_once('./global.php');
i get this message
Fatal error: main(): Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*****/public_html/index.php on line 3
Andreas
09-14-2005, 01:15 PM
It's /home/whatever/public_html/forum, not home/whatever/public_html/forum
MamboCube
09-14-2005, 01:26 PM
k i put that but then i get this message
Warning: main(./includes/init.php): failed to open stream: No such file or directory in /home/*****/public_html/forum/global.php on line 18
Fatal error: main(): Failed opening required './includes/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*****/public_html/forum/global.php on line 18
i then tried putting chdir('/home/*****/public_html/forum'); into global.php and the page loaded fine with no error messages but none of the vbphrases work lol
-----------------------------------------------------------------
should i not use the chdir in global.php?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.