vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Cron job problem.. (https://vborg.vbsupport.ru/showthread.php?t=169579)

Marco van Herwaarden 02-08-2008 05:20 AM

2 major reasons for such behaviour:
- Variable scope as Lynne mentioned
- Code that depends on the current user. (if you run with Run Now it will run under your admin account, if it gets ran automatic it can be triggered by any user/guest visiting your board)

leenster 02-09-2008 12:09 AM

i still cant figure it out..

my code is independent of vbulletin, i even made sure there is a connection to the database from my script, there are no globals in use as far as i know. my script could run standalone without vbulletin installed so its user independent.....

the complete code is listed above (first post in the thread).

any other ideas?

Lynne 02-09-2008 03:42 AM

Quote:

Originally Posted by leenster (Post 1439158)
i still cant figure it out..

my code is independent of vbulletin, i even made sure there is a connection to the database from my script, there are no globals in use as far as i know. my script could run standalone without vbulletin installed so its user independent.....

the complete code is listed above (first post in the thread).


any other ideas?

My cron job was totally independent of vb also - it was for my tracker. But, when I talk about the global problem, I'm talking about ones like this:
Code:

function startTag($parser, $name, $attrs) {
 global $stack;

 $tag=array("name"=>$name,"attrs"=>$attrs);
 array_push($stack,$tag);
}

I was no longer able to declare something as global like that in my functions. I had to change all my code to pass the variable. So, in the example there, I had to pass $stack, not declare it as global like I had been before.

leenster 02-09-2008 04:48 AM

ah.....gotcha ... im gonna see what i can do

--------------- Added [DATE]1202587096[/DATE] at [TIME]1202587096[/TIME] ---------------

thanx for pointing me in the right direction guys....

the problem was with the globals :)


All times are GMT. The time now is 04:30 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.01519 seconds
  • Memory Usage 1,721KB
  • 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_quote_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
  • (4)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