Announcement

Symphony's issue tracker has been moved to Github.

Issues are displayed here for reference only and cannot be created or edited.

Browse

Closed#631: Select Box: dynamic options throw fatal error

After choosing dynamic options for a select box, trying to open or create an entry in the specific section throws a fatal database 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 WHERE Field = 'value' at line 3

An error occurred while attempting to execute the following query

SHOW COLUMNS FROM sym_entries_data_122 WHERE Field = 'value'

The dynamic options stuff it working fine for me in 2.2.1. What version of MySQL are you running? It looks like your version of MySQL doesn't support this syntax :-/

What happens if you run the following query against the database directly (through Sequel Pro or phpMyAdmin):

SHOW COLUMNS FROM sym_entries_data_122 WHERE Field = 'value'

The query works for me if I change 122 to a table that has a value column.

Looking at the difference between SHOW COLUMNS In v4 and v5 of MySQL, I'm not sure v4 supports WHERE, instead it used LIKE or IN. So if you're using MySQL 4 then this will be the cause.

Hmm the minimum requirements for Symphony seem to be MySQL 4.1 or above. I wonder if it's time to increase these to MySQL 5...

We are on MySQL 4.1 which is the minimum requirement for Symphony.

What happens if you run the following query against the database directly

#1064 - 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 'WHERE Field = 'value'' at line 1 

As a quick fix you could modify the statement to use LIKE to match the column name. That might be compatible with both 4 and 5. Should we increase the minimum requirement to v5?

I also spotted this syntax in SSM when I searched.

We are on MySQL 4.1

Are you really sure? This version is very old. MySQL 5 was released in 2005, and active support for version 4 was stopped in 2006.

Should we increase the minimum requirement to v5?

I think so.

Two things we can do:

  • Bump the requirement and offer a diff for users who can't update their MySQL version
  • Offer the diff now for those users, and in the next release change the syntax to use LIKE which is still supported by MySQL 4

We have a few client projects on MySQL 4.1 so I would be nice if Symphony 2 wouldn't drop support for it.

I don't disagree with your suggestion Brendan. However:

MySQL 5 was released in 2005, and active support for version 4 was stopped in 2006.

The majority of us will be using v5 for development, so the chances of incompatible code slipping in will remain high. I see this as being similar to supporting IE6 or 7, at what point can we drop it?

@Nils Is there any reason why? I guess they aren't using SSM then?

My preference is the first one, there is a countless improvements in MySQL 5.x and if it hasn't been actively supported in 5 years, then is seems odd that Symphony would still support it. Completely agree with your comment regarding development.

Officially supporting MySQL 4.1+ should mean that we should be testing our code on that version as well, and we're not. I think it'll be a 'it's nice if it runs on MySQL 4.1, but Symphony will no longer offer support for that version'.

Proposal Raise the requirement to MySQL 5+

@Nils Is there any reason why?

It's the provider who decided to still use MySQL 4.1 - but it seems that they changed their policy just lately and started upgrading their servers to version 5 step by step. With that in mind, I'd be fine with a raise to MySQL 5.

Proposal Raise the requirement to MySQL 5+

Seconded...

Keeping this open to remind the team to action the MySQL requirement.

Another thread where this has been flagged as an issue. Can we bump this up the priority list?

http://getsymphony.com/discuss/thread/71410/

Couple of things:

  • MySQL 5.0 is now required to install Symphony
  • Symphony 2.2.2 Beta 1 has this requirement in it's README
  • The code in question has been rolled back to support MySQL 4.x
  • This has been migrated to Symphony's internal issue tracker (#12) for actioning

This issue is closed.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details