Few problems after moving hosts.

Started by ephekt, June 06, 2005, 04:55:25 PM

Previous topic - Next topic

ephekt

Ok, so I moved hosts this past weekend.   I have everything up and running on the new host, save for two problems my users have noticed.   Problem one, is that the date on the "Users Online" page reads "December 31, 1969, 06:00:00 PM" currently.   The time changes, but the date remains the same.   However, threads and posts read the correct date and time. (after setting the new offset.)   

My server echoes this time and date: [khan]$ date
Mon Jun  6 13:48:30 PDT 2005
[khan]$
 

Here is an image that illustrates the problem.




The second problem is that the forum only shows one online user (me), regardless of who or how many users are online.   Right now there are three people browsing the forum, besides me.   I have confirmed this with the three users.

Here is an image that illustrates the problem.



Anyone have any ideas on what might be causing this, and how to fix it?

Oldiesmann

Looks like it's either an issue with one of the Sources files that writes this data, or there's a problem with the log_online table. That date you're seeing is the default UNIX timestamp and will be used if the value passed for the log time is not a valid date. Try re-uploading the Sources directory.

Also, run this query in phpMyAdmin

CHECK TABLE smf_log_online;

If it returns anything other than "OK", run the following query:

REPAIR TABLE smf_log_online;

ephekt

Quote from: Oldiesmann on June 06, 2005, 05:29:59 PM
Looks like it's either an issue with one of the Sources files that writes this data, or there's a problem with the log_online table. That date you're seeing is the default UNIX timestamp and will be used if the value passed for the log time is not a valid date. Try re-uploading the Sources directory.
I used wget to pull everything over, cleaned it up and replaced the index file.   I'm still having the same problems.
QuoteAlso, run this query in phpMyAdmin

CHECK TABLE smf_log_online;
That query returns OK.

[Unknown]


ephekt


[Unknown]

Have you changed the server's default sql_mode?  SMF expects it to be set to MySQL's default, not ansi.  1.1 has an option to change it on the fly, although of course this is less efficient.

-[Unknown]

ephekt

Seeing as how I have no idea how to change SMF's default SQL mode, I'd say no.  :P    My new host may use some oddball method I'm unaware of, but I've yet to run into any problems with my other applications.

[Unknown]

Try running this in phpMyAdmin:

SELECT @@sql_mode;

What is phpMyAdmin?

What result does it give?

-[Unknown]

ephekt

#8

[Unknown]

Interesting.  I wonder if phpMyAdmin might be changing it.. I doubt.

Okay, what about:

SHOW CREATE TABLE smf_log_online;

-[Unknown]

ephekt

#10
CREATE TABLE `smf_log_online` (\n  `session` varchar(32) NOT NULL default '',\n  `logTime` timestamp NOT NULL default '0000-00-00 00:00:00',\n  `ID_MEMBER` mediumint(8) unsigned NOT NULL default '0',\n  `ip` int(11) unsigned NOT NULL default '0',\n  `url` text NOT NULL,\n  PRIMARY KEY  (`session`),\n  KEY `online` (`logTime`,`ID_MEMBER`),\n  KEY `ID_MEMBER` (`ID_MEMBER`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1

[Unknown]

ALTER TABLE smf_log_online
CHANGE COLUMN logTime logTime timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;

Does that help?

-[Unknown]

ephekt

#12
The first lines runs just fine, but doesn't return anything.    When I run the second command, I get this:
QuoteSQL-query:

CHANGE COLUMN logTime logTime timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

MySQL said: Documentation
#1064 - 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 'COLUMN logTime logTime timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CU' at line 1

I tried pasting it directly into the query box and saving it as a .sql file and importing it.

[Unknown]

That is one query, on two lines.  Please enter the entire thing into the box at once.

-[Unknown]

ephekt

#14
Ok, well I feel stupid now.  :P

That seems to have fixed it though!   I apologize for my cluelessness and I appreciate all of your help, Unknown.    Thanks to everyone who replied as well.

Any idea why this happened?   Did I mess up the db export/import somehow?

[Unknown]

Well, for some reason the table wasn't created as the MySQL documentation (and my experience with 4.1 and 5.0) describes....

-[Unknown]

ckamstra

Just had this same problem with 1.0.7, this fixed it, thumbs up!!

Advertisement: