Welcome! Log In Create A New Profile

Advanced

Syntax Error on GoDaddy install

Posted by iscllc 
Syntax Error on GoDaddy install
March 13, 2014 05:46PM
I am trying to install sphider on a Godaddy site. I am inexperienced in this so bear with me.

I got the following error when running the install.php Sphider installation script.

Error: 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 '(14), elapsed float(2), results int, key query_key(query))' at line 3
Creating tables failed. Consult the above error messages.

Any info on how to address these errors would be appreciated.
Tec
Re: Syntax Error on GoDaddy install
March 14, 2014 05:09PM
It is not a GoDaddy issue, but meanwhile some PHP scripts of the original Sphider are a little out of date.

In …/admin/install.php
find

create table query_log (
        query varchar(255),
        time timestamp(14),
        elapsed float(2),
        results int,
        key query_key(query)
        ) ENGINE = MYISAM;


Replace the above with

create table query_log (
        query varchar(255),
        time timestamp,
        elapsed float(2),
        results int,
        key query_key(query)
        ) ENGINE = MYISAM;

Tec
Re: Syntax Error on GoDaddy install
March 29, 2014 09:10PM
Thanks for the reply and sorry about the delay in looking at it, but have had some other issues to deal with first. In attempting to make the changes you recommended I am not sure how to proceed as the syntax I have doesn't quite match what you say I should find and replace.

Here is what I have.

mysql_query("create table `".$mysql_table_prefix."query_log` (
query varchar(255),
time timestamp(14),
elapsed float(2),
results int,
key query_key(query))"winking smiley;

Its pretty clear that I should remove the (14) but the last line doesn't match with what you indicated I should have so I am not sure if I need to edit and if so, how.

Any help is appreciated.
Tec
Re: Syntax Error on GoDaddy install
March 30, 2014 04:30PM
Hello,

You may ignore the last row and just replace
time timestamp(14),
with
time timestamp,


Tec
Re: Syntax Error on GoDaddy install
March 31, 2014 12:44PM
Thanks, that worked. I appreciate the help.



Edited 1 time(s). Last edit at 03/31/2014 04:54PM by iscllc.
Sorry, only registered users may post in this forum.

Click here to login