phpbb_copy_users

Advertise a phpBB hack or request help with an existing one.

Moderator: TerraFrost

Postby 19_Chevelle_69 » Mon Jan 03, 2005 2:45 am

Thank you for your time.

I have to say that I got it all figured out and working, just before I popped back in here to let you know.

As it turns out, my host had been moving stuff around, and I had the chance to do the copy while both sites were on my own domain.

At first, I had errors to do with the "user_points" thing, but then I realized that I had to delete the extra options in your config_xxx.php file if I didnt have those hacks installed.

It worked so well, it should be "Hack of the Year"

One of the easiest mods/hacks, I've ever had the chance to use. And one of the most useful.

Thank you SOO much for all your efforts!

If you'll excuse me, I have to go to phpBBhacks.com and give this mod the highest rating I can.
19_Chevelle_69
Traveler
 
Posts: 19
Joined: Mon Jan 03, 2005 12:28 am

Postby TerraFrost » Mon Jan 03, 2005 2:49 am

glad it worked out ^_^
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Postby 19_Chevelle_69 » Mon Jan 03, 2005 3:00 am

Check the post, down near the bottom......

http://www.phpbbhacks.com/forums/viewtopic.php?t=14260

Thanks again.

Next step for me.... shared_reg

You may just hear from me in that topic as well.... ;)
19_Chevelle_69
Traveler
 
Posts: 19
Joined: Mon Jan 03, 2005 12:28 am

Postby 19_Chevelle_69 » Tue Jan 04, 2005 10:13 pm

Just a quick question, although the copy_users works for me, I have these errors when copying.....

Code: Select all
Warning: array_keys(): The first argument should be an array in /home/chevy/public_html/copy_users/copy_users.php on line 125

Warning: array_diff(): Argument #1 is not an array in /home/chevy/public_html/copy_users/copy_users.php on line 125
None copied



Here is a copy of my copy_config file.....(note, i changed my sensitive info to x's. that's not what i actually have in the file...lol)

Code: Select all
<?
   // Board Login Info.
   // Add the login info for each board you want to copy users from / to in the following format.
   // if one of the boards is PHP-Nuke, replace 'phpbb' in the type index with 'phpnuke'.
   $boards[] = array(
                  'hostname' => 'localhost',
                  'database' => 'xxxxx_xxxxx',
                  'username' => 'xxxxx_xxxxx',
                  'password' => 'paswwordhere',
                  'prefix'   => 'phpbb_',
                  'type'     => 'phpbb'
               );
   $boards[] = array(
                  'hostname' => 'localhost',
                  'database' => 'xxxxx_xxxxx',
                  'username' => 'xxxxx_xxxxx',
                  'password' => 'paswwordhere',
                  'prefix'   => 'phpbb_',
                  'type'     => 'phpbb'
               );

   // Path to plugin directory
   $pluginPath = './copy_plugins/';

   // phpbb_user elements to reset.
   // add or delete whatever elements you like.
  ?>



The copy process still works, I just get these errors. I have none of the mods on my site for the points sytem, so I didn't keep it in there. Any thoughts?

Thanks in advance.
19_Chevelle_69
Traveler
 
Posts: 19
Joined: Mon Jan 03, 2005 12:28 am

Postby TerraFrost » Wed Jan 05, 2005 12:07 am

hmmm. there's not really a lot i can determine from those error messages without access to the ftp server...

if you could provide me such access (only temporarily, of course), i could fix it right up, and would give you credit in the MOD history for helping me to fix the bug :)
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Postby 19_Chevelle_69 » Wed Jan 05, 2005 12:17 am

Thanks you anyways, and it's not that I suspect malicious intent, but the access I have through my FTP is more than my own domain. I don't think it would be responsible of me to give that information out. If it was just my own info, I truly wouldn't have a problem with it.

I posted that the hack works, which it does incredibly well! ... I was just curious about the errors.

I will do some investigating, and see what I can come up with. I doubt I will know it when I see it, but I'll post back if I figure anything out.

Thanks for your time, it's very much appreciated!
19_Chevelle_69
Traveler
 
Posts: 19
Joined: Mon Jan 03, 2005 12:28 am

Postby TerraFrost » Wed Jan 05, 2005 12:36 am

hmmm. well, i can probably debug it without ftp access. it just won't be able to be debuged as fast as i'd like it to be, heh.

anyway, if you're willing, find this line in copy_users.php:

Code: Select all
      while ($destUsers[] = mysql_fetch_assoc($results));

and after it, add the following:
Code: Select all
echo $destUsers[0]."<br>---<br>";
print_r($destUsers[0]);
echo "<br>---<br>"'
print_r($destUsers);
exit();

because of the exit, the script will be terminated before any changes to the database are made.

anyway, if you could tell me what the output is, that'd be great :)
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Postby 19_Chevelle_69 » Wed Jan 05, 2005 12:51 am

ok, I made the changes, and ran the copy_users.php in a browser window.

Here's the output....

Code: Select all
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/chevy/public_html/copy_users/copy_users.php on line 113


That point you anywhere?

(Sorry to make it difficult, I just can't give my FTP info out....)
Don

19_Chevelle_69
http://www.chevylegends.com
19_Chevelle_69
Traveler
 
Posts: 19
Joined: Mon Jan 03, 2005 12:28 am

Postby TerraFrost » Wed Jan 05, 2005 1:18 am

uh, heh. there was a typo in the code i wanted you to add. here's version 1.0.1 :):
Code: Select all
echo $destUsers[0]."<br>---<br>";
print_r($destUsers[0]);
echo "<br>---<br>";
print_r($destUsers);
exit();
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Postby 19_Chevelle_69 » Wed Jan 05, 2005 1:22 am

The output is all the info and encrypted passwords and profile info for all the members....probably 3 pages long, is that what you wanted?????
Don

19_Chevelle_69
http://www.chevylegends.com
19_Chevelle_69
Traveler
 
Posts: 19
Joined: Mon Jan 03, 2005 12:28 am

Postby TerraFrost » Wed Jan 05, 2005 1:38 am

i just wanted to know if it outputted user info. if you could remove what you added, and then find this:
Code: Select all
      while ($origUsers[] = mysql_fetch_assoc($results));

and add the following after it, that'd be great!:
Code: Select all
echo $origUsers[0]."<br>---<br>";
print_r($origUsers[0]);
echo "<br>---<br>";
print_r($origUsers);
exit();

does the basic structure look the same?
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Postby 19_Chevelle_69 » Wed Jan 05, 2005 1:41 am

It looks like the same 3 pages of info.... I didn't look to deeply, but it looks like the same content...
Don

19_Chevelle_69
http://www.chevylegends.com
19_Chevelle_69
Traveler
 
Posts: 19
Joined: Mon Jan 03, 2005 12:28 am

Postby TerraFrost » Wed Jan 05, 2005 2:09 am

hmmm. can you replace the above code that was added with this?:

Code: Select all
print_r(array_keys($origUsers[0]));
exit();


it should output something like this:

Code: Select all
Array ( [0] => user_id [1] => user_active [2] => username [3] => user_password [4] => user_session_time [5] => user_session_page [6] => user_session_topic [7] => user_lastvisit [8] => user_regdate [9] => user_level [10] => user_posts [11] => user_timezone [12] => user_style [13] => user_lang [14] => user_dateformat [15] => user_new_privmsg [16] => user_unread_privmsg [17] => user_last_privmsg [18] => user_emailtime [19] => user_viewemail [20] => user_attachsig [21] => user_allowhtml [22] => user_allowbbcode [23] => user_allowsmile [24] => user_allowavatar [25] => user_allow_pm [26] => user_allow_viewonline [27] => user_notify [28] => user_notify_pm [29] => user_popup_pm [30] => user_rank [31] => user_avatar [32] => user_avatar_type [33] => user_email [34] => user_icq [35] => user_website [36] => user_from [37] => user_sig [38] => user_sig_bbcode_uid [39] => user_aim [40] => user_yim [41] => user_msnm [42] => user_occ [43] => user_interests [44] => user_actkey [45] => user_newpasswd [46] => user_points [47] => user_items [48] => user_custitle [49] => user_specmsg [50] => user_effects [51] => user_privs [52] => user_regip [53] => user_firstpost [54] => user_wordwrap )
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Postby 19_Chevelle_69 » Wed Jan 05, 2005 2:12 am

Yep, it does just that....
Don

19_Chevelle_69
http://www.chevylegends.com
19_Chevelle_69
Traveler
 
Posts: 19
Joined: Mon Jan 03, 2005 12:28 am

Postby TerraFrost » Wed Jan 05, 2005 2:18 am

could you find this line of code:
Code: Select all
      $resetKeys = array_diff(array_keys($userReset),$diffKeys);

and before it, add this:

Code: Select all
print_r($userReset);
echo '<br>---<br>'.$userReset;
exit();

assuming you're not using the overwrite copy method, nothing should be changed in the databases.

anyway, it should output something similar to the $userReset thing in the config file.
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

PreviousNext

Return to phpBB Hacks and MODs

Who is online

Users browsing this forum: No registered users and 2 guests

cron