Unknown column 'com.time' in 'field list'

Started by carnaith, June 22, 2009, 02:33:53 PM

Previous topic - Next topic

carnaith

this happens when i click on profile

Unknown column 'com.time' in 'field list'
File: /home/fancya/public_html/Forum/Sources/Profile.php
Line: 1509

erm help please me thick

Kermit

A column with name com.time is not a default column on SMF ,so the error is regarding a new installed mod ,which has affect on Profile.php

Indeed because of this mod

http://custom.simplemachines.org/mods/index.php?mod=1675

you're getting that error

The fix is run attached file once (also upload it to the root directory of your site where SSI.php located is the root directory and run it by calling this url http://www.mysite.com/database.php )
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

carnaith


ShadoWind

I know this sounds stupid but how do I run the database.php file? I've FTP'ed it to the root folder and made a backup as well but I get a 404 error when I type in the address with the database.php address added to it.

Arantor

Is Settings.php and SSI.php in that root directory?
Holder of controversial views, all of which my own.


ShadoWind

Yes, they're definitely in the root directory.

Arantor

What about the permissions for that database.php? Are they the same as SSI.php and Settings.php?

And if your forum is mysite.com/forum/, are you going to mysite.com/forum/database.php ?
Holder of controversial views, all of which my own.


ShadoWind

#7
I checked the setting and it turns out that it's set to 644. I automatically assumed it would switch to 755 when it was copied to the folder.

The link in this case should be asianami.com/forum2/database.php as that's where the forum is located although with the test forum, it would be the same but with the 'forum 2' part replaced by 'test-forum' instead. I'll go and change the setting in the meantime.

EDIT: Tried it again and still no joy as I'm getting an Internal Server Error.

http://www.asianami.com/test-forum/database.php
is the link where the database is located.

Norv

Can you please check the webserver error logs if you have access to them (in your host's cpanel, perhaps), and post here eventually the errors you may find?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

ShadoWind

I've checked my cPanel and there's no error logs available...

Norv

Okay, please try in phpMyAdmin then, to run this query:

show columns from smf_profile_comments;

(replace "smf_" with your database prefix).
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

ShadoWind

How do I run the query as I've never used phpMyAdmin before.

Norv

#12
Please check out: Edited: phpMyAdmin
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

ShadoWind

What link should I check out? [Thank you for being very helpful! :)]

Norv

Sorry about that, writing too fast here and I didn't notice copy-paste failed me! :(
Edited the link above.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

ShadoWind

#15
No need to apologise as I do that sort of thing all the time!

EDIT: I think I've found the code needed:

Field Type Null Key Default Extra
ID_COMMENT int(11) NO PRI NULL auto_increment
ID_MEMBER mediumint(8) unsigned NO 0
comment text YES NULL
subject varchar(100) YES NULL
date int(11) NO 0
COMMENT_MEMBER_ID mediumint(8) unsigned NO 0
approved tinyint(4) NO 1


Norv

Okay, so there is indeed still no "time" column.
Please first, make a backup of the table just in case: select the table smf_profile_comments and use "export" to save it into a file. I think your data is safe if you let the defaults of the export, but make sure you check the "save as file" checkbox, if any.

If the above succeeded, then, afterwards, run also:

ALTER TABLE smf_profile_comments ADD time INT NOT NULL AFTER date;
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

ShadoWind

This is what I got:ALTER TABLE smf_profile_comments ADD time INT NOT NULL AFTER date

EDIT: I forgot to mention that it was color coded if that's any help in the top section.

Norv

It should have said somewhere whether it succeeded (and how many rows were affected), but I suppose it did, since if there was any error messages, those are so ugly and obviously displayed :)
Can you please see if you still have the error with "Unknown column 'com.time' in 'field list'" ?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

ShadoWind

#19
Which one's the field list?

EDIT: You can tell I'm a newbie at PHP! LOL

Advertisement: