MyBB Community Forums

Full Version: Register new user with PHP script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
#1 Your require path is probably wrong
#2 You need to initialize other dependencies for it to work. Just load init.php instead.
(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.
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-14, 03:10 PM)RenegadeFan Wrote: [ -> ]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!');
?>

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.
after <?php please put:
error_reporting(E_ALL);
That should show any things PHP doesn't like.
(2008-12-15, 07:28 AM)DennisTT Wrote: [ -> ]after <?php please put:
error_reporting(E_ALL);
That should show any things PHP doesn't like.

I tried that but did not get any messages at all. Please help me out. Thanks.
Ok can you post your latest code again
<?php
define("IN_MYBB", 1);
define("NO_ONLINE", 1);
require_once('./yourmybbpath/inc/init.php');
$cache->update_stats();
echo('Updated Finished!');
?>
(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-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.
Pages: 1 2 3