vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Included PHP changes time on posts (https://vborg.vbsupport.ru/showthread.php?t=226952)

malmazan 10-28-2009 11:38 AM

Included PHP changes time on posts
 
Hi all:

I have a small puzzling issue with what should be a simple PHP inclusion.

I have included a php file (a simple snippet to call an OpenX an ad) a per documentation http://www.vbulletin.com/docs/html/t..._externalfiles

The post times are now 4 hours late (i.e., if you just finished publishing a post, its time is 4 hours later than the time indicated at the bottom of the page for the local time). Disabling the plugin cures the problem.

I have pasted the plugin and the php below:

Code:

ob_start();
include('/home/root/myfile.php');
$includedphp = ob_get_contents();
ob_end_clean();


Where the php file is just an OpenX ad call:
PHP Code:

<?php
//<!--/* OpenX Local Mode Tag v2.8.1 */-->

define('MAX_PATH''/home/root/openx');
if (@include_once(
MAX_PATH '/www/delivery/alocal.php')) {
if (!isset(
$phpAds_context)) {
$phpAds_context = array();
}
$source=''$withtext=''$context=''$charset='')
$phpAds_raw view_local(''0350'''''0'$phpAds_context'');
}
echo 
$phpAds_raw['html'];
?>


Lynne 10-28-2009 02:50 PM

Go through your added code (like you are adding alocal.php) and see if TIMENOW gets redefined or if any time variable is used at all. It could be a conflict in variable names.

malmazan 10-29-2009 05:01 AM

Apparently it's a known bug in OpenX, as I learned.


All times are GMT. The time now is 03:52 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.01049 seconds
  • Memory Usage 1,718KB
  • 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)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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