PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |

Go Back   PhotoPost Community > PhotoPost Support > PhotoPost Classifieds Support > Classifieds Installation & Upgrades

Classifieds Installation & Upgrades If you're having install or upgrade problems, post here.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old June 24th, 2006, 04:35 PM   #1 (permalink)
Member
Verified Customer
 
Join Date: May 2003
Location: Spring Branch, Texas
Posts: 391
How to use Userfix.php for Classifieds & RP?

I've got all three PP, PPC and RP. I switched forums today from PHPBB to vB and I'm starting to work on the PP products.

I've started with PP Classified and got the database changed for integration, but need to update the users IDs now.

I've got userfix.php but it seems to be just for PP. What should I do for Classifieds and ReviewPost?

Thanks
creativepart is offline   Reply With Quote
Old June 24th, 2006, 05:00 PM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,695
There are specific scripts in the import forum also for reviewpost and classifieds
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old June 24th, 2006, 05:40 PM   #3 (permalink)
Member
Verified Customer
 
Join Date: May 2003
Location: Spring Branch, Texas
Posts: 391
Thanks I got em.

But I'm running classfix.php and it seems to be doing something weird so I can't tell if it's an error or not.

It's using the vB header and footer. It says, "PhotoPost Classifieds Upgrade
Preparing to update ads userids..." Above the vb header. Then in the middle of the page it says: Guitars and Gear For Sale Message
We're sorry, but the system experienced an unrecoverable error. Please try again later."

then there is a lot of white space followed by the vB footer.

I can't imagine that this is correct?
Attached Images
File Type: jpg classfix.jpg (61.5 KB, 5 views)

Last edited by creativepart; June 24th, 2006 at 05:54 PM.
creativepart is offline   Reply With Quote
Old June 24th, 2006, 06:06 PM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,695
You would have to say in your pp-inc.php remove this in bold to see your mysql error. I don't see anything wrong with the script

Code:
Content visible to verified customers only.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old June 24th, 2006, 06:11 PM   #5 (permalink)
Member
Verified Customer
 
Join Date: May 2003
Location: Spring Branch, Texas
Posts: 391
Chuck,
You lost me? "You would have to say in your pp-inc.php remove this in bold..."

I'm not understanding this. First, I see nothing in bold at all. Just a code box.

Could you take another shot at telling me what to do?

Paul
creativepart is offline   Reply With Quote
Old June 24th, 2006, 09:07 PM   #6 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,695
The line I posted above is right in pp-inc.php and you can remove the part in bold from that line. That will make the error show up on upgrade to see what your issue is.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old June 25th, 2006, 03:04 PM   #7 (permalink)
Member
Verified Customer
 
Join Date: May 2003
Location: Spring Branch, Texas
Posts: 391
OK got that. (Though on my system the "bold" part is only ever so slightly bold, if at all. Not really enough to tell a difference but I got an idea of what you meant. You've told me to look at the bold part in one of your posts before and then I couldn't see anything bolder then the other, as well.)

Here's what I got in return after making that change in pp-inc.php:

Quote:
Script: classfix

Query: SELECT userid,username,email,password,usergroupid,timezoneoffset,salt,membergroupids FROM vB_user WHERE username='Ramblin' Ray'

Result: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Ray'' at line 1

Database handle: Resource id #5
I know that I have some members with apostrophes, ampersands, and quotes around their usernames. It seems that this is the problem. However, I tried changing his username to exclude the apostrophe and it still gave the same error -- as if the apostrophe was still there.

I made his username Ramblin Ray yet the error still came back as Ramblin' Ray.

Huh? How could that be?
creativepart is offline   Reply With Quote
Old June 25th, 2006, 03:52 PM   #8 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,695
How about simply doing this in userfix.php Add the code in bold here

Code:
Content visible to verified customers only.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old June 25th, 2006, 05:57 PM   #9 (permalink)
Member
Verified Customer
 
Join Date: May 2003
Location: Spring Branch, Texas
Posts: 391
That seemed to do it.

But when I look at the Classifieds (the application) all the users are user=0 at least in the application they are. Do I need to do a Scan Database Resync Users and Comments or something?

I looked in the db at the class_ user table looks like it has userids, not zero's. The usergroupid is 0 on them all, though.

When I installed PP Classifieds I was userid=2 in my PHPBB forum. I made the first test ad and tested it sold, etc. In my new vB3 forum I am userid=3. If I look in my vB3 user table I see me as userid=3 and the importuserid=2. I ran the classfix.php now after your change and it went through all the steps. But when I look in the PP Classifieds user table I see userid=2 as the very first entry that should be me. Shouldn't it show userid=3 or am I missunderstanding how it works?

Paul

Last edited by creativepart; June 25th, 2006 at 06:11 PM.
creativepart is offline   Reply With Quote
Old June 25th, 2006, 06:43 PM   #10 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,695
Did you properly integrate with vb3?

This script will update the userid for the based on their username after you properly integrate with vb3
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old June 25th, 2006, 11:10 PM   #11 (permalink)
Member
Verified Customer
 
Join Date: May 2003
Location: Spring Branch, Texas
Posts: 391
Yes I did integrate it with vB3. Every step was followed and the application reflects that in every way including the Admin CP. But, now, after running classfix.php, if I put my mouse over the username on ANY random ad it shows and links to:
"http://www.mydomain.com/classifieds/member.php?uid=0". It's this way on every one of the ads.

If I click on "memberlist" inside Classifieds I see ALL of the usernames of folks with ads... but all of the links link to uid=0

Should I try the "resync" in scandatabase or rerun the classfix.php?

It's obviously putting usernames with ads -- whether it's correct or not I have no idea. I've attached a screenshot of the "memberlist" first page from PP Classifieds and here is the link info shown in the links for every username in the screenshot:

http://www.domain.com/classifieds/member.php/uid/0
http://www.domain.com/classifieds/sh...t/500/ppuser/0
Attached Images
File Type: jpg class_users.jpg (35.2 KB, 1 views)

Last edited by creativepart; June 25th, 2006 at 11:30 PM.
creativepart is offline   Reply With Quote
Old June 25th, 2006, 11:42 PM   #12 (permalink)
Member
Verified Customer
 
Join Date: May 2003
Location: Spring Branch, Texas
Posts: 391
I do have one question about vB3 integration. In the user registration admin entry. Before switching I used phpbb2 for that field. Now I'm using vb3.

I wasn't 100% sure what I should use there, but since that was the name of the integration file in the classifieds "forums" directory I figured it was correct. And, I'm able to log on and stay logged on with it set that way.

I was not 100% sure what, exactly, that should be. So you could confirm that.

But as I said. I'm recognized by PP Classifieds as logged in and as Admin with that setting.

ALSO, I did give my vBulletin database tables a prefix (vB_) and that is non-standard. I think the vB3 standard is no prefix. I have it set up that way in PP Classifieds -- that my vB tables are all prefixed with vB_. I do see that classfix.php factors in the pp classifieds db prefix.

Is it possible that the classfix.php assumes that the vB3 tables have no prefix -- and it doesn't pick up that setting from the "forum settings" field in Admin???

I've attached a screenshot of my Classifieds Products table from phpmyadmin. You'll see the usernames... and the userid is zero on all of them.
Attached Images
File Type: jpg products_table.jpg (33.1 KB, 2 views)

Last edited by creativepart; June 25th, 2006 at 11:51 PM.
creativepart is offline   Reply With Quote
Old June 26th, 2006, 07:40 AM   #13 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,695
Try running the script again I do not see a thing wrong with the script itself. Clearly we grab the userid from the and issue an update command. I would need phpmyadmin login info and login info to assist if you wish.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old June 26th, 2006, 11:17 AM   #14 (permalink)
Member
Verified Customer
 
Join Date: May 2003
Location: Spring Branch, Texas
Posts: 391
Re-ran the script but no joy. I checked and the userids are updated and correct for everything else but "products". The "products" table shows ALL users with a uid of 0.

However, I checked the "comments" table and the UIDs are there and I checked them against the VB user table and they appear to be correct. Feedback has UIDs too, but I didn't check them for accuracy. I don't have any bids.

Could the "add slashes" line you had me add to classfix.php have an effect on products only? And, as I asked before... could the vB_ prefix effect the process in any way?

Maybe I should reapply a backup of the Classifieds db and start from scratch.

I need to get this solved so that I can reopen PP, RP and PP C.

Thanks for your help.
Paul
creativepart is offline   Reply With Quote
Old June 26th, 2006, 11:47 AM   #15 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,695
Well remember your usernames should never be stored with a slash so this could yes be an issue for those names but not all. Addslashes are only added to make the query work. They are removed by mysql. Now if you have a larger database issue where Slammin' Sam's is stored as Slammin\' Sam\'s then thats an issue that should not be there.

I do not see any issues in the script by it would not work. Try downloading the script. I did addslashes on every part and see if things work.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old June 26th, 2006, 11:50 AM   #16 (permalink)
Member
Verified Customer
 
Join Date: May 2003
Location: Spring Branch, Texas
Posts: 391
It is classfix.php that's changing all the userids in the "Products" table to zero.

I restored the products table from my pre-migration backup. All the items in the Products tables had user IDs (the old PHPBB uids). I ran Cleaner.php and they were all changed to zero.

Could it be anything BUT the "Add Slashes" routine you had me add to the script?
creativepart is offline   Reply With Quote
Old June 26th, 2006, 11:53 AM   #17 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,695
I see no issue as stated and it seems to work fine on my site so redownload and try it again. I already offered to help a few posts up
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old June 26th, 2006, 12:02 PM   #18 (permalink)
Member
Verified Customer
 
Join Date: May 2003
Location: Spring Branch, Texas
Posts: 391
Thanks Chuck, I keep thinking we've just about got it.

I'll try the redownload and if all else fails take you up on your kind offer.
creativepart is offline   Reply With Quote
Old June 26th, 2006, 12:32 PM   #19 (permalink)
Member
Verified Customer
 
Join Date: May 2003
Location: Spring Branch, Texas
Posts: 391
OK Here's what happened:

I downloaded the classifix.zip again, and replaced the php file on my server.

I ran classfix.php and got the original error on "Ramblin' Ray". Which was surprising. But it was the identical error. I didn't expect to get that error because you said you had added the 'add_slashes" commets all the way through the script. Did I misunderstand?

Anyway, after running classfix and getting the error, I checked the database for "Products". All the userids had been correctly changed up to the user BEFORE Ramblin' Ray. From that point on none of the userid were changed at all.

So it seems that this one record from Ramblin' Ray -- which is smack in the middle of all records in the products table is stopping the process.

Why don't I simply delete this guy's ad in the product table and run classfix again. That should fix it.

But you should also know that your script doesn't allow for apostrophe's in the username.

Let me know what you think I should do.
Paul
creativepart is offline   Reply With Quote
Old June 26th, 2006, 12:47 PM   #20 (permalink)
Member
Verified Customer
 
Join Date: May 2003
Location: Spring Branch, Texas
Posts: 391
I went ahead and changed Ramblin' Ray's username in both the Products table and vb_users to Ramblin Ray without the apostrophe. I did a search to be sure he was only listed once in Classifieds and he was.

That fixed it.

The program ran, changed the Uids just fine.

But still your import script doesn't work with apostrophe's in the username. I would guess it will be the same with quotes.

I'll certainly do some checking of my database before I work on Review Post and PhotoPost.

Thanks for all your help. Don't know if we "fixed" anything be we learned a lot.

Paul
creativepart is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP & FAQ's for Gallery and Classifieds Please molieman General Discussion 3 October 24th, 2005 06:39 PM
Stand-Alone Photpost, ReviewPost & Classifieds smartboyinuk Before You Buy 23 September 22nd, 2005 04:24 PM
& and " for edit reviews.php/edit(FIXED) Arnie ReviewPost Bug Reports 4 September 8th, 2005 02:04 PM


All times are GMT -5. The time now is 06:19 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0