Hi Folks,

PHP version: 5.2.5

MySQL version: 5.0.45

osTicket version: RC3

I am trying to install osTicket but getting the following error message on installation /setup/index.php

Invalid SQL schema. Get help from Developers

Database

MySQL is the only database supported at the moment.

You have an error in your SQL syntax

Can anyone suggest a solution?

Thanks in advance!

JasonB,

Hard to tell which query is causing the error.

Edit setup/index.php and make the following changes;

Change:

$errors='You have an error in your SQL syntax';

to

$errors='You have an error in your SQL syntax '.$sql .'';

Give it another try and let us know the error message displayed.

Thanks Peter. This is the db_error() output that I got:

You have an error in your SQL syntax CREATE TABLE ost_config ....

Edit setup/osticket.sql change api_whitelist tinytext NOT NULL default '', to api_whitelist tinytext NOT NULL,

Yeah, I tried that earlier (api_whitelist tinytext NOT NULL,), then I got another error:

You have an error in your SQL syntax INSERT INTO ost_config SET isonline=1, updated=NOW()

So, now I changed that to:

INSERT INTO %TABLE_PREFIX%config SET isonline=1, updated=NOW(), api_whitelist='';

And boom, that seemed to work and got the sweet confirmation: "Congratulations osTicket basic installation completed!"

So,

1. Is the hack above recommended?

2. Do I need to hack any other file as far as 'api_whitelist' field is concerned?

3. Did I get this error because of the MySQL version, or that I am using Windows - not all behavior can be expected to run as they should?

I have fiddled with osTicket a bit, and think it's a fantastic application with great attention to detail and quality. Thanks for this excellent application!

The issue is caused by MySQL when in strict mode which is common with windows installations. Next release will include the hack.

Enjoy and please remember to provide us with feedback.

Write a Reply...