vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Including Global.php (https://vborg.vbsupport.ru/showthread.php?t=96255)

MamboCube 09-14-2005 12:07 PM

Including Global.php
 
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 ...

Code:

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


All times are GMT. The time now is 04:43 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00991 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete