2008-12-14, 06:55 AM
2008-12-14, 01:07 PM
(2008-12-14, 06:55 AM)Ryan Gordon Wrote: [ -> ]#1 Your require path is probably wrong
#2 You need to initialize other dependencies for it to work. Just load init.php instead.
Thanks for the reply Gordon. But do you mean that I just have to put in the path for the init.php instead of the class_datacache.php ? Is that all I need to do or should I have to change some other things as well ? I am new to PHP so I am not very familiar with its ways. Thanks once again.
2008-12-14, 03:10 PM
You can take out this:
<?php
require ('class_datacache.php');
echo('Update starting...');
$cache = new datacache;
$cache->update_stats();
echo('Updated Finished!');
?>
And replace it with this:<?php
require_once('./yourmybbpath/inc/init.php');
$cache->update_stats();
echo('Updated Finished!');
?>
2008-12-15, 02:30 AM
(2008-12-14, 03:10 PM)RenegadeFan Wrote: [ -> ]You can take out this:
And replace it with this:<?php require ('class_datacache.php'); echo('Update starting...'); $cache = new datacache; $cache->update_stats(); echo('Updated Finished!'); ?>
<?php require_once('./yourmybbpath/inc/init.php'); $cache->update_stats(); echo('Updated Finished!'); ?>
I really appreciate how you took your time to give me the actual code. But the sad thing is that it is not working. I don't know what is going wrong. I edited the path in case you are wondering. I even disabled the security settings for init.php as it was protected and required 'IN_MYBB' to be defined. But I am still not getting any results. I am not receiving the 'Updated Finished!' message that I should be getting.
2008-12-15, 07:28 AM
after <?php please put:
error_reporting(E_ALL);
That should show any things PHP doesn't like.2008-12-15, 08:52 PM
(2008-12-15, 07:28 AM)DennisTT Wrote: [ -> ]after <?php please put:
That should show any things PHP doesn't like.error_reporting(E_ALL);
I tried that but did not get any messages at all. Please help me out. Thanks.
2008-12-16, 08:57 AM
Ok can you post your latest code again
2008-12-16, 06:02 PM
<?php
define("IN_MYBB", 1);
define("NO_ONLINE", 1);
require_once('./yourmybbpath/inc/init.php');
$cache->update_stats();
echo('Updated Finished!');
?>
2008-12-16, 09:23 PM
(2008-12-16, 06:02 PM)Ryan Gordon Wrote: [ -> ]<?php define("IN_MYBB", 1); define("NO_ONLINE", 1); require_once('./yourmybbpath/inc/init.php'); $cache->update_stats(); echo('Updated Finished!'); ?>
THANK YOU VERY VERY MUCH! This code worked like a charm! I really appreciate all of your help. Thank you.
2008-12-17, 12:44 AM
(2008-12-16, 09:23 PM)hollamonkey241 Wrote: [ -> ](2008-12-16, 06:02 PM)Ryan Gordon Wrote: [ -> ]<?php define("IN_MYBB", 1); define("NO_ONLINE", 1); require_once('./yourmybbpath/inc/init.php'); $cache->update_stats(); echo('Updated Finished!'); ?>
THANK YOU VERY VERY MUCH! This code worked like a charm! I really appreciate all of your help. Thank you.
Will you, please, share the reg script once it's working?
(or is it a "commercial project"?)
Thank you.