Welcome to Geeklog, Anonymous Wednesday, October 09 2024 @ 12:20 am EDT

Geeklog Forums

Upgrade to windows/MSQL


JUSTRAGE

Anonymous
Hi everyone.

I have spent the last 9 hours doing an upgrade from an old outdated version (1.3.11) to the latest version. This migration was also from unix/msql to windows/mssql

I have been running into 2 different problems that I cant seem to fix and I wanted to find out if anyone could help me out with them.

Currently when I try to even view a page I am getting the following SQL error:

An SQL error has occurred. Please see error.log for details. - SELECT s.sid, s.uid, s.draft_flag, s.tid, s.date, s.title, cast(s.introtext as text) as introtext, cast(s.bodytext as text) as bodytext, s.hits, s.numemails, s.comments, s.trackbacks, s.related, s.featured, s.show_topic_icon, s.commentcode, s.trackbackcode, s.statuscode, s.expire, s.postmode, s.frontpage, s.in_transit, s.owner_id, s.group_id, s.perm_owner, s.perm_group, s.perm_members, s.perm_anon, s.advanced_editor_mode, dbo.UNIX_TIMESTAMP(s.date) AS day, u.username, u.fullname, u.photo, t.topic, t.imageurl FROM gl_stories AS s, gl_users AS u, gl_topics AS t WHERE (s.uid = u.uid) AND (s.tid = t.tid) AND (date <= getUTCDate()) AND (draft_flag = 0) AND frontpage = 1 AND (s.perm_anon >= 2) AND 0 ORDER BY featured DESC, date DESC

I think this error started happening after I updated the topics but I'm not too sure, I know when I remove AND 0 from the query it does work, but I don't konw exactlly what this 0 is supposed to be a value for, or why it is breaking.

I also get kind the same error when trying to view directory.php

An SQL error has occurred. Please see error.log for details. - SELECT YEAR(date) AS year FROM gl_stories WHERE (draft_flag = 0) AND (date <= getUTCDate()) AND 0 AND (perm_anon >= 2) GROUP BY YEAR(date) ORDER BY YEAR(date) DESC

And finally when I go to the admin section and login I get this error. It seems to be logging me in because the session table gets updated with the userid.
An SQL error has occurred. Please see error.log for details. - SELECT DISTINCT ft_name FROM gl_access,gl_features WHERE ft_id = acc_ft_id AND acc_grp_id IN ()

Thanks, and any help you can give me will be great.

O and you can get access to the site here:
http://dev.truepunk.com
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Hmm, how did you do the upgrade? We don't actually support switching an existing database from MySQL to MS SQL ...

bye, Dirk
 Quote

JUSTRAGE

Anonymous
I manually upgraded everything thats why it took about 10 hours lol.

I was able to get the stories to work by deleting the old (new?) table and just starting over, There seemed to be a problem with some of the previous data.

I think I am down to 1 final problem.

I can login with the admin account, but when I try to login with any of my pre-existing accounts I get:
An SQL error has occurred. Please see error.log for details. - DELETE FROM gl_sessions WHERE uid =

Which seems like it is trying to delete the anonymous session (uid 1) but fails because for some reason the uid isn't passed correctly...
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: JUSTRAGE

Which seems like it is trying to delete the anonymous session (uid 1) but fails because for some reason the uid isn't passed correctly...


No, it's trying to delete any expired sessions for the current user (deleting anonymous sessions would include the IP address).

Try setting $_SESS_VERBOSE = true; near the top of system/lib-sessions.php and see if it logs anything useful in error.log.

bye, Dirk
 Quote

All times are EDT. The time is now 12:20 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content