View Full Version : Problem with User ID after 4Images import
May 15th, 2008, 04:55 AM
I just did the import of my 4Images gallery to photopost.
The problem now is, that the User IDs are a complete mess.
We had vBulletin and the 4Images gallery as two seperate Homepages with sepereate registrations. Of our 8000 Users in the vbulletin only 400 wanted to use the 4Images gallery and registered there with their vbulletin nickname.
Now I have the following situation:
User ID in Database: 377
User ID in Database: 22
So after the import in Photopost, all the pictures who were uploaded from the User "Vivalranger" (ID:22) were connectet with the User which has the ID:22 in the vBulltetin forum. But that is not the correct User...
I hope, I managed to explain the problem.
What can I do about this?
- would it be possible to manually change all the 400 UserIDs in 4Images to the corresponding UserID of the vbulletin forum. Or will the DB get messed up if freely change the UserIDs? (and besides that it is a hell lot of work)
- would it be possible to modify the import script so that it compares the usernames and assigns the correct ID corresponding to a Username match?
Hoping that you can help me or at least give me some advice...
May 15th, 2008, 10:41 AM
Your actually in luck!
In Most cases you would be out of luck because its not really a problem with our software or our importer. You choose not to have those two application integrated so userid's would not be correct as you have found out.
Now enough people switched integrations to vbulletin that I wrote a little tool for that here
It was essentially written to realign photo id's after people imported phpbb2 to vbulletin etc but it works really for anything. What it does is grabs the photo username and authenticates the user against vb and grabs their info and updates the userid with whats in vbulletin or really any forum you integrate with.
May 15th, 2008, 04:21 PM
hmm... I think this script will not solve the problem here.
The thing is, that after I imported all the pictures from 4images there are no usernames shown. Only after I click on
Scan Database --> resync photo/comments usernames/update comments
does Photpost show me the Usernames of the pictures. But by then the mistakes has happened.
Guess I would need to run the script on 4Images BEFORE I do the import, so that the Usernames in 4Images will get the corresponding UserID from vbulletin.
The script will porbably not work with 4Images, will it? :rolleyes:
May 15th, 2008, 04:22 PM
It was essentially written to realign photo id's after people imported phpbb2 to vbulletin etc but it works really for anything.
ok... I just found the answer :o
May 15th, 2008, 04:40 PM
Warning: main(pp-inc.php) [function.main]: failed to open stream: No such file or directory in /var/www/fotos/userfix.php on line 102
Fatal error: main() [function.require]: Failed opening required 'pp-inc.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/fotos/userfix.php on line 102
ok... would have been too easy to just copy the script to my 4Images directory and run it there.
May 15th, 2008, 05:25 PM
If works for Photopost only the script I posted.
Try redownloading the 4images importer and try doing a fresh import again clear your photopost photos table of all entries
I made a little change that might help you. The photos table of 4images if I remember right does not store a username so I added another query to grab it.
May 15th, 2008, 06:21 PM
You did it!
... but now photopost doesn't show me any pics in my categories, although there are pic in them.
scan database --> Check here to recalculate photos/posts numbers and check children
does not seem to work anymore... any suggestions?
sorry for all the trouble :o
May 15th, 2008, 06:22 PM
May 15th, 2008, 06:23 PM
oh... fixed it.
Had to save the categories again.
Thanks so much, chuck!!
May 15th, 2008, 08:44 PM
Not a problem I was just gonna say if you did a reimport do the work instructed in the import thread. :)
May 22nd, 2008, 01:45 PM
now that everything worked out fine on the backup server I get the following message when trying to import form 4images on our live-server:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'xxx'@'localhost' (using password: YES) in /var/www/photopost/4images.php on line 298
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'xxx'@'localhost' (using password: YES) in /var/www/photopost/4images.php on line 299
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /var/www/photopost/4images.php on line 313
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /var/www/photopost/4images.php on line 315
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /var/www/photopost/4images.php on line 317
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /var/www/photopost/4images.php on line 320
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/photopost/4images.php on line 321
Importing 1 users .... please wait
Click here to import categories
any ideas what went wrong there?
I CHMODed the 4images.cnf.php to 777
The databasename, username and passwort for the database are correct....
Am I missing something obvious??
somehow it does not get access to the database, right? But to which database? the 4images or the photopost database?
May 22nd, 2008, 02:20 PM
Something in your config file is not correct for the live server with errors like that being listed.
Based on your errors the information for both 4images and Photopost are wrong. See the errors line 298-299
$vbc = mysql_connect($vhost,$vuser,$vpwd);
$u3t = mysql_connect($uhost,$uuser,$upwd);
That means both are wrong
May 23rd, 2008, 03:30 AM
I tried several times to type in the login information again... and then it worked.
At least I looked like it.
Importing the Users, categories and picture names seems to work.
Comments do not work and once it gets to importing the picture files I get the following message:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/photopost/4images.php on line 574
Importing 1 files .... please wait
here is line 574.
When I the look into the admin CP of Photopost, I see no new categories... nothing.
Any ideas?? :(
May 23rd, 2008, 03:35 AM
I had a mistake in the table prefixes.
Sorry for the bother... :)
May 23rd, 2008, 10:20 AM
Not a problem you have a good weekend.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.