Please help us to develop!
Reply to topic Reply to topic
Page 1 of 1 Tp MOD Forum Index / Tp MOD Support / Error on moving to another server  

PostPost subject: Error on moving to another server Posted: 11-14-2008 19:31
usagi



UL: 25 GB
DL: 1 MB
Ratio: 25600
Joined: 2006-04-22
Posts: 65
  It's been a while since I've been here.

I switched servers and now I'm getting an error message:

Could not obtain post/user information.

DEBUG MODE

SQL Error : 1054 Unknown column 'u.user_id' in 'on clause'

SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_from_flag, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid, bt.u_up_total, bt.u_down_total FROM phpbb_posts p, phpbb_users u, phpbb_posts_text pt LEFT JOIN phpbb_bt_users bt ON u.user_id = bt.user_id WHERE p.topic_id = 1080 AND pt.post_id = p.post_id AND u.user_id = p.poster_id ORDER BY p.post_time ASC LIMIT 0, 15

Line : 475
File : viewtopic.php

When I looked in viewtopic.php I saw another version of the $sql = command:
Code:
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_from_flag, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*,  pt.post_text, pt.post_subject, pt.bbcode_uid, bt.u_up_total, bt.u_down_total, bt.user_id
  FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt, " . BT_USERS_TABLE . " bt
  WHERE p.topic_id = $topic_id
    $limit_posts_time
    AND pt.post_id = p.post_id
    AND u.user_id = p.poster_id
    AND u.user_id = bt.user_id
  ORDER BY p.post_time $post_time_order
  LIMIT $start, ".$board_config['posts_per_page'];


I tried that and I don't get an error message but when I try to go to some posts that are in the rolling list on the front page I get this:
No posts exist for this topic

This all worked fine before I moved hosts.

Any ideas ? Anyone know how to fix this or would be willing to try ?

Usagi


_________________
Usagi
  Reply with quote
View user's profile Send private message
PostPost subject: Please Click to support this site Posted: 11-14-2008 19:31
Google

AdSense






 


 
PostPost subject: Re: Error on moving to another server Posted: 11-15-2008 01:42
usagi



UL: 25 GB
DL: 1 MB
Ratio: 25600
Joined: 2006-04-22
Posts: 65
  I have this narrowed down now.

I went through one post. At the top it said that there were 21 pages but in fact there were only 19. When you went to page 20 or 21 you got the error message: "No posts exist for this topic." When I looked in the phpbb__posts table I found that 2 members had made posts and that none of their posts were appearing on the forum.

On a hunch I looked them up on the forum and found that neither had a passkey generated so I went to their page and generated one for each of the two members.

All posts then appeared and there were 21 of 21 pages.

Fixing the code above so that it gathers all posts, even those of people who have never generated a passcode would fix the problem. My problem is that I never make mySQL calls in that manner, my code is far simpler, so the code truly confuses me.

The other fix would be that all members get issued a passkey when they join. However that wouldn't fix members who have already joined, don't have a passkey and then post. One would have to check to see if they have a passkey before recording their post and if they don't then give them a passkey

Anyways, fixing the code in viewtopic.php would probably be the best way to fix this problem.

Help please ?

Usagi


_________________
Usagi
  Reply with quote
View user's profile Send private message
PostPost subject: Posted: 11-15-2008 14:46
Quake

Site Admin
Site Admin

UL: 4 MB
DL: 2 KB
Ratio: 2277.13
Joined: 2006-01-16
Posts: 486
  thats the PHP 5.0 or MySQL something bug. Your new server probably is set on PHP 5.0 or gr8er MySQL. The Fix for that is on here. Some where. It's something to do with bracketing () in the php code. I believe so.

Remember this one?
http://tp-mod.sytes.net:6969/viewtopic.php?t=149

Fix:
http://tp-mod.sytes.net:6969/viewtopic.php?t=470

See the Brackets (XXXXXXXXXXXXXXXXX)?
Quake

  Reply with quote
View user's profile Send private message
PostPost subject: Posted: 11-15-2008 20:31
usagi



UL: 25 GB
DL: 1 MB
Ratio: 25600
Joined: 2006-04-22
Posts: 65
  Thanks Quake

Yes, I see the brackets. That fixed it.

Usagi


_________________
Usagi
  Reply with quote
View user's profile Send private message
Page 1 of 1
Reply to topic Reply to topic
 Tp MOD Forum Index / Tp MOD Support / Error on moving to another server

Jump to: 



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB - 2001, 2002 phpBB Group
All times are GMT - 6 Hours ,
TorrentPier © Meithar - Support Tp MOD ©