TinyPortal

Development => Support => Installation => Topic started by: wilsy on April 12, 2010, 04:26:37 PM

Title: Downloads Issues
Post by: wilsy on April 12, 2010, 04:26:37 PM
Hi all,

Im getting this in the downloads section at

http://atco-uk.com/index.php?action=tpmod;dl=cat25

Unknown column 'dlm.author_id' in 'where clause'
File: /home/atcoukco/public_html/Sources/TPSubs.php
Line: 2442


Any ideas?
Title: Re: Downloads Issues
Post by: IchBin on April 12, 2010, 05:05:40 PM
I'm guessing your db update didn't complete for your upgrade. Although, it's hard to tell because you didn't tell us what version of TP or SMF your running, and also whether you have upgraded or not...
Title: Re: Downloads Issues
Post by: wilsy on April 12, 2010, 05:19:47 PM
Hi Ich,

Its running SMF 1.1.11 and TinyPortal 1.0 beta 5-1. I ran an upgrade from 1.099.

Title: Re: Downloads Issues
Post by: IchBin on April 12, 2010, 05:31:29 PM
run the tp_install.php file and see if that updates the tables. I think the row name authorid was supposed to be renamed to author_id, thats why you get the error.
Title: Re: Downloads Issues
Post by: wilsy on April 12, 2010, 05:39:17 PM
Hi Ich,

I ran that file from the root and got the message:

table could not be updated
Title: Re: Downloads Issues
Post by: IchBin on April 12, 2010, 05:40:58 PM
Doesn't say which table or anything?
Title: Re: Downloads Issues
Post by: wilsy on April 12, 2010, 05:43:10 PM
Hi Ich,

Check it out: -

http://www.atco-uk.com/tp_install.php
Title: Re: Downloads Issues
Post by: IchBin on April 12, 2010, 05:48:42 PM
Does your database user have permission to alter tables?
Title: Re: Downloads Issues
Post by: wilsy on April 12, 2010, 05:50:31 PM
Not too sure I'm following you there?
Title: Re: Downloads Issues
Post by: IchBin on April 12, 2010, 05:53:32 PM
The user that you're using to connect to your database. It has to have permission to alter the tables in order to complete the operations in the tp_install.php file. There are several instances in that file where TP is trying to alter the tables to change/set the collation.
itpdb_query("ALTER TABLE `" . $tp_prefix . "articles` DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci") or die('table could not be updated');

You'll need to look at the permissions for your user in mysql to see if it has the ability to alter tables.
Title: Re: Downloads Issues
Post by: wilsy on April 12, 2010, 05:57:33 PM
But if Im just running that file from the root how would it matter who has permissions?
Title: Re: Downloads Issues
Post by: Blue Steel on April 12, 2010, 06:02:26 PM
the permissions are to access and ALTER the Database Table Structure in the sql DataBase not the file system
Title: Re: Downloads Issues
Post by: wilsy on April 12, 2010, 06:05:26 PM
Quote from: BlueSteel on April 12, 2010, 06:02:26 PM
the permissions are to access and ALTER the Database Table Structure in the sql DataBase not the file system

Yes, I understand that and I have those permissions as a database user but I was asked to run this file http://www.atco-uk.com/tp_install.php and couldnt understand why I needed to have correct db permissions to do it.

Am I running the file from the correct location?
Title: Re: Downloads Issues
Post by: IchBin on April 12, 2010, 06:13:27 PM
Yes you are running it from the correct location. The file alters the database in order to upgrade your install. Alter permissions are required for the DB in order for the tp_install.php to do its job.
Title: Re: Downloads Issues
Post by: Blue Steel on April 12, 2010, 06:15:16 PM
when ever you access the DB it uses your user unfo that you have in your TP install (if you have it installed .. if not then it'll ask you for the details if it can't find them)

this is the user name and password associated with the DB .. sometimes the SQL servers don't give users persission to ALTER DB Tables .. some just allow you to read them etc.. so you need to check to see if the user info your providing have permission to do these things in the DB.

You upload the tp files into the same dir that you have the SMF forum installed
Title: Re: Downloads Issues
Post by: Blue Steel on April 12, 2010, 06:15:52 PM
gee i'm getting slower ichbin beat me to it again .. lol
Title: Re: Downloads Issues
Post by: wilsy on April 12, 2010, 06:16:51 PM
Thanks Ich/Blue,

I have those permissions as a user but it doesnt give me an option to fill anything in, it just comes straight up with that error.

Admin/FTP access available if required?
Title: Re: Downloads Issues
Post by: IchBin on April 12, 2010, 07:03:19 PM
Do you have phpMyAdmin? Can you give me access to that so I can take a look at things?
Title: Re: Downloads Issues
Post by: wilsy on April 12, 2010, 07:16:51 PM
Quote from: IchBinâ„¢ on April 12, 2010, 07:03:19 PM
Do you have phpMyAdmin? Can you give me access to that so I can take a look at things?

Sent via PM - thanks for all the help, its appreciated.
Title: Re: Downloads Issues
Post by: IchBin on April 12, 2010, 07:48:45 PM
Ok, I was able to run the file after some editing. I do not see that it made the necessary changes though. Can you tell me if the error changed in your downloads area?
Title: Re: Downloads Issues
Post by: wilsy on April 12, 2010, 08:00:29 PM
Quote from: IchBinâ„¢ on April 12, 2010, 07:48:45 PM
Ok, I was able to run the file after some editing. I do not see that it made the necessary changes though. Can you tell me if the error changed in your downloads area?

Hi Ich,

No, the error is still there:

http://atco-uk.com/index.php?action=tpmod;dl=cat25
Title: Re: Downloads Issues
Post by: IchBin on April 12, 2010, 08:02:35 PM
Can you Enable/Disable eval() (http://www.simplemachines.org/community/index.php?topic=290186.0) and see if the error message changes in any way?
Title: Re: Downloads Issues
Post by: wilsy on April 12, 2010, 08:08:46 PM
Quote from: IchBinâ„¢ on April 12, 2010, 08:02:35 PM
Can you Enable/Disable eval() (http://www.simplemachines.org/community/index.php?topic=290186.0) and see if the error message changes in any way?

Done but stayed the same:

http://atco-uk.com/index.php?action=tpmod;dl=cat25

Database Error: Unknown column 'dlm.author_id' in 'where clause'
File: /home/atcoukco/public_html/Sources/TPSubs.php
Line: 2442
Title: Re: Downloads Issues
Post by: IchBin on April 12, 2010, 08:29:37 PM
Looks like Bloc hasn't converted everything properly yet. Open TPSubs.php and change this line:
AND dlm.author_id=mem.id_member

To this:
AND dlm.authorID=mem.id_member

Let me know if you see more errors.

-edit-

Bug Reference - http://www.tinyportal.net/index.php?action=bugtracker;sa=bug561
Title: Re: Downloads Issues
Post by: wilsy on April 12, 2010, 08:38:11 PM
Quote from: IchBinâ„¢ on April 12, 2010, 08:29:37 PM
Looks like Bloc hasn't converted everything properly yet. Open TPSubs.php and change this line:
AND dlm.author_id=mem.id_member

To this:
AND dlm.authorID=mem.id_member

Let me know if you see more errors.

-edit-

Bug Reference - http://www.tinyportal.net/index.php?action=bugtracker;sa=bug561

Sorted - you are THE man ;)