Osticket: 1.10RC3: DB Error #1064

Created on 26 Aug 2016  Â·  16Comments  Â·  Source: osTicket/osTicket

Hello,

I get this after Login:

[CREATE TABLE IF NOT EXISTS ost_ticket__cdata (PRIMARY KEY (ticket_id)) DEFAULT CHARSET=utf8 AS SELECT entry.object_id as ticket_id, FROM ost_form_entry entry JOIN ost_form_entry_values ans ON ans.entry_id = entry.id JOIN ost_form_field field ON field.id=ans.field_id WHERE entry.object_type='T' GROUP BY entry.object_id] 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 'FROM ost_form_entry entry JOIN ost_form_entry_values ans ON ans.entr' at line 2

---- Backtrace ----

0 (root)/include/mysqli.php(204): osTicket->logDBError('DB Error #1064', '[CREATE TABLE I...')

1 (root)/include/class.dynamic_forms.php(292): db_query('CREATE TABLE IF...')

2 (root)/include/class.dynamic_forms.php(285): DynamicForm::buildDynamicDataView(Array)

3 (root)/include/staff/tickets.inc.php(371): DynamicForm::ensureDynamicDataView()

4 (root)/scp/tickets.php(492): require_once('/var/dir/...')

5 (root)/scp/index.php(17): require('/var/dir/...')

6 {main}


[CREATE TABLE IF NOT EXISTS ost_ticket__cdata (PRIMARY KEY (ticket_id)) DEFAULT CHARSET=utf8 AS SELECT entry.object_id as ticket_id, FROM ost_form_entry entry JOIN ost_form_entry_values ans ON ans.entry_id = entry.id JOIN ost_form_field field ON field.id=ans.field_id WHERE entry.object_type='T' GROUP BY entry.object_id] 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 'FROM ost_form_entry entry JOIN ost_form_entry_values ans ON ans.entr' at line 2

---- Backtrace ----

0 (root)/include/mysqli.php(204): osTicket->logDBError('DB Error #1064', '[CREATE TABLE I...')

1 (root)/include/class.dynamic_forms.php(292): db_query('CREATE TABLE IF...')

2 (root)/include/class.dynamic_forms.php(285): DynamicForm::buildDynamicDataView(Array)

3 (root)/include/staff/tickets.inc.php(8): DynamicForm::ensureDynamicDataView()

4 (root)/scp/tickets.php(492): require_once('/var/dir/...')

5 (root)/scp/index.php(17): require('/var/dir/...')

6 {main}

Apache 2.4.10, PHP 7.0.10, MySQL 5.5.50

Fresh install started with 1.10RC3.

Regards,

Afox

Most helpful comment

I can confirm that this only happens if you have i18n phar file (in my case german) at the setup time.

All 16 comments

@greezybacon or @protich can you please have a look at this?

I think #3334 is a result out of this one.

after one week not even a reaction on this blocker? I need help, please!

ok guys, I worked around this issue by first installing Version 1.9.14 and then upgrading to 1.10rc3. now things look quite good.
btw: I also tried a fresh install of 1.10rc2 which was not successful either.

Likewise issue on 1.10:

CREATE TABLE IF NOT EXISTS `ost_ticket__cdata` (PRIMARY KEY
                (ticket_id)) DEFAULT CHARSET=utf8 AS SELECT entry.`object_id` as `ticket_id`,  FROM ost_form_entry entry
            JOIN ost_form_entry_values ans ON ans.entry_id = entry.id
            JOIN ost_form_field field ON field.id=ans.field_id
            WHERE entry.object_type='T' GROUP BY entry.object_id

```#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM ost_form_entry entry JOIN ost_form_entry_values ans ON ans.entr' at line 2

```

Makes osTicket unusable on Ubuntu 16.04.

@scroom maybe you could actually provide some more information because your response provides less information than would be desirable.

Server environment (including OS, Webserver and ver, PHP and ver, DBsoftware and Ver), DB user's rights, any other pertinent information (such as when the error triggers for you), steps to reproduce the error, webserver modules used [such as mod_security, SELinux, etc.)

@ntozier Ubuntu 16.04, Apache/2.4.18 (Ubuntu), PHP 7.0.15-0ubuntu0.16.04.2, mysql Ver 14.14 Distrib 5.7.17, the db user has all rights granted on the DB.

The error occurs everytime I'm refreshing the ticket-list. It is not possible to create tickets.

(in fact there are several other reports of this error. A solution seems to be to install at first osTicket 1.9.15, to configure everything and then to update this version to 1.10. But due to the fact that you have to downgrade the standard PHP version from 7.0 to 5.6 this doesn't seem to be a good solution from my point of view)

@scroom version of osTicket? (this thread is about 1.10RC3 which I trust you are NOT running)

@ntozier Sorry. osTicket-version is 1.10 stable.

@ntozier Maybe I should open a new ticket? There are a lot of bugs trying to install osTicket 1.10 stable on Ubuntu 16.04 (for a lot of them there are already pulls requests but which are not already implemented in the software.

Versión osTicket v1.10 (901e5ea) — Hasta la fecha
Servidor del Software Web Apache/2.4.18 (Ubuntu)
Versión MySQL 10.0.29
Versión PHP 7.0.15-0ubuntu0.16.10.4

Same issue. -->SQL syntax error
DB Error #1064

[CREATE TABLE IF NOT EXISTS ost_ticket__cdata (PRIMARY KEY (ticket_id)) DEFAULT CHARSET=utf8 AS SELECT entry.object_id as ticket_id, FROM ost_form_entry entry JOIN ost_form_entry_values ans ON ans.entry_id = entry.id JOIN ost_form_field field ON field.id=ans.field_id WHERE entry.object_type='T' GROUP BY entry.object_id] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM ost_form_entry entry JOIN ost_form_entry_values ans ON ans.entr' at line 2

---- Recular ----
#0 (raíz)/include/mysqli.php(204): osTicket->logDBError('DB Error #1064', '[CREATE TABLE I...')
#1 (raíz)/include/class.dynamic_forms.php(292): db_query('CREATE TABLE IF...')
#2 (raíz)/include/class.dynamic_forms.php(285): DynamicForm::buildDynamicDataView(Array)
#3 (raíz)/include/staff/tickets.inc.php(8): DynamicForm::ensureDynamicDataView()
#4 (raíz)/scp/tickets.php(492): require_once('/var/www/html/s...')
#5 (raíz)/scp/index.php(17): require('/var/www/html/s...')
#6 {main}
Fecha de registro: viernes, 28 de abril de 2017, 17:04

Got the same error. Any workaround?

Executed this query (removed the comma):

CREATE TABLE IF NOT EXISTS `ost_ticket__cdata` (PRIMARY KEY
                (ticket_id)) DEFAULT CHARSET=utf8 AS SELECT entry.`object_id` as `ticket_id` FROM ost_form_entry entry
            JOIN ost_form_entry_values ans ON ans.entry_id = entry.id
            JOIN ost_form_field field ON field.id=ans.field_id
            WHERE entry.object_type='T' GROUP BY entry.object_id

But still get 500 error if I try to create a ticket...

I have seen this type of error only when an install of osticket 1.10 was done in combination with an additional language pack. The installer of osticket 1.10 doesn't work correctly with an additional language pack. Adding an language pack after the install of osticket 1.10 doesn't make problems.

@mfelber Same, I've only seen this error on lang pack installs.

The lang pack install issue is a known issue with a fix on the way. We found out that it's the way Crowdin structures their downloaded files. We will re-package the files and upload them to http://osticket.com very soon. To follow up on the status of this, please follow this issue. Thanks!

I can confirm that this only happens if you have i18n phar file (in my case german) at the setup time.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SysEngDan picture SysEngDan  Â·  5Comments

roman-1983 picture roman-1983  Â·  5Comments

rob-tv picture rob-tv  Â·  3Comments

markus4000 picture markus4000  Â·  3Comments

alansebastian picture alansebastian  Â·  3Comments