vb.org Archive

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

iadmirevb 05-01-2010 06:21 PM

PHP Header
 
i have already posted this post on the programming forum but i believe it fits better on this forum. Sorry. I can't delete or move it...
---------------
Hello,
I've read all about including a php file but i'm having issues. More precisely, speed issues.

I've utilized the plugin system and hook at global_start to include a php file in my header like this:
Code:

ob_start();
include('http://www.mysite.com/header/header.php');
$fanclubheader = ob_get_contents();
ob_end_clean();

And I'm calling this code in the header template using the following:
Code:

$fanclubheader


<!-- content table -->
$spacer_open

$_phpinclude_output
$ad_location[ad_header_end]

For testing purposes, i've made the header.php very simple. I'm planning to add a menu with links and some stuff:
PHP Code:

<?php
<img src="http://www.mysite.com/header/images/bg.jpg" alt="Header" />
?>

For some reason, it takes between 10 to 15 seconds for my forum to load. When i disable the plugin, it takes 1-3 seconds (normal time).

Sometimes (not all the time), i'm getting this in the header:

Warning: include(http://www.mysite.com/header/header.php) [function.include]: failed to open stream: Connection timed out in [path]/global.php(400) : eval()'d code on line 2

Warning: include() [function.include]: Failed opening 'http://www.mysite.com/header/header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in [path]/global.php(400) : eval()'d code on line 2

Any idea what the problem could be? I can't figure out this one.

Thanks in advance for all your help
Marco


All times are GMT. The time now is 10:26 PM.

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.01128 seconds
  • Memory Usage 1,713KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete