PDA

View Full Version : Failed install: You have an error in your SQL syntax:


jonnymaeno
01-20-2008, 09:36 AM
Um I can't even install it. Can't even get past the first page of setup. I hacked the index.php for some better error reporting:

$errors['mysql']="You have an error in your SQL syntax: $sql)"; // added the $sql part

Error:
You have an error in your SQL syntax: INSERT INTO ost_config SET updated=NOW())


I looked into the ost_config table created, every column is mandatory but has defaults except:
`api_whitelist` tinytext NOT NULL,


The create table script needs to either add the default or not make it mandatory.

Anyway can someone tell me what this value should be set to? I'll hack it in just to get it installing... want to try but it won't let me..

4ice
01-21-2008, 03:09 PM
Hi jonny,

are you using the latest osTicket version? Because I haven't heard this problem from anyone before.

The api_whitelist has no value by default. It is still empty after installation. Are you sure this is the part that is going wrong?

crash_dummy
01-24-2008, 12:07 PM
Hello guys and girls,

i get the same error.

I want to install it for test purposes and at the moment i'am to busy to analyse the code to find the problem.

Im using:
osTicket v1.6 RC2
WinXP
Apache 2.2.6
php 5.2.5
mysql 5

Has anyone a solution?

jonnymaeno
01-26-2008, 07:36 AM
Thanks for confirming that this column can be NULL.
The fix is to make the column not mandatory in the initial sql create script:

setup/osticket.sql

find:
`api_whitelist` tinytext NOT NULL,

replace:
`api_whitelist` tinytext NULL,

Seriously the install script executes setup/osticket.sql and inserts the first config row by only updating the timestamp column bascially triggering all the defaults, but this column 'api_whitelist' is missing the default so it is a MySQL error.

Clean install on Windows machine not upgrade.
php5.2.5
MySQL 5.0.45

This is definitely a bug, can we more this to bugs.. forums or do we make a another post?

crash_dummy
01-29-2008, 07:58 AM
Thanks, that works