cancel
Showing results for 
Search instead for 
Did you mean: 

Joomla problem

wombatz
Newbie
Posts: 7
Registered: ‎20-05-2011

Joomla problem

been trying to install an extension onto my Joomla site and got a strange error.
"DB function failed with error number 1142"
INDEX command denied to user 'user'@'212.159.7.xxx' for table 'sbc_attachments' SQL=CREATE INDEX attachment_parent_id_index ON `sbc_attachments` (`parent_id`) (ERR 7)
Any idea what I might be doing wrong here?
7 REPLIES 7
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Joomla problem

That message implies you do not have 'create index' permission on that table which is surprising. So I wonder if this is a symptom of another problem. For instance does the index exist already?
What Joomla extension are you trying to install?
David
wombatz
Newbie
Posts: 7
Registered: ‎20-05-2011

Re: Joomla problem

ok so im not entirely sure what im doing here but ive looked up the table on the php admin table. found the sbc_attachments table. I cant see an index on parent_id but i dont know if it would be obvious or not.
I can see a function to create one though
wombatz
Newbie
Posts: 7
Registered: ‎20-05-2011

Re: Joomla problem

forgot to say - the extension i was trying to install was the attachments extenstion here:
http://joomlacode.org/gf/project/attachments/frs/
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Joomla problem

If the secondary index existed it would be listed on a second row of type Index under the primary one.
I suggest trying to create it using phpMyAdmin.
To do this you need to click the Go button on the Create index row, which brings up a dialogue. Enter the index name shown in the error message in the box at the top and select the column to be indexed in the selection box at the bottom. Then click Save and it should add that index (using an Alter Table command equivalent to the Create Index one that failed). This works (on a test table) for me.
I've tried doing the same operation on my test table using the create index style command and got the #1142 - INDEX command denied to user … error you experienced. So the problem is that we don't have permission to use that style of command.
From a quick look at the PHP code which installs this add-on I think it checks if the index is already present and only creates it if it doesn't. So I suggest trying installation again after manually adding that index. Hopefully installation will then work. Smiley
David
wombatz
Newbie
Posts: 7
Registered: ‎20-05-2011

Re: Joomla problem

well that seems to have worked !!
Seems a strange oversight to not allow users permission to add an index. Can we put any pressure on PlusNet to fix this?
Anyway thanks for your help.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Joomla problem

Glad to hear that worked. Smiley
Google shows many instances of the create index error with this Joomla extension so I think it is a common problem, not Plusnet specific. Possibly this is not in the standard list of grants for non-privileged users. That could be for security reasons. As you've demonstrated the alternative command used by phpMyAdmin works, had that been used in this extension code installation would have been successful.
I don't think this problem is widespread - didn't notice its occurrence in other contexts. However I will be raising it with Plusnet.
David
wombatz
Newbie
Posts: 7
Registered: ‎20-05-2011

Re: Joomla problem

sounds sensible.
Thanks again fro your help.