Support

Akeeba Backup for Joomla!

#28875 Update failure v5.6.3: error in your SQL syntax

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by duanemitchell on Friday, 15 December 2017 11:08 CST

duanemitchell
Please look at the bottom of this page (under Support Policy Summary) for our support policy summary, containing important information regarding our working hours and our support policy. Thank you!

EXTREMELY IMPORTANT: Please attach a ZIP file containing your Akeeba Backup log file in order for us to help you with any backup or restoration issue. If the file is over 2Mb, please upload it on your server and post a link to it.

Description of my issue:

Just updated several sites to v5.6.3 of Akeeba Backup. One failed with the error below.

Database error - 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 '' at line 3

nicholas
Akeeba Staff
Manager
I cannot reproduce this issue and I'm not sure it comes from our code (as opposed from Joomla! itself or a third party plugin in the system, content or installation folders). You see, the update process is handled by Joomla!, not Akeeba Backup. Moreover, there has been no change in our database structure for over a year, meaning that an update will not trigger a database update. Finally, the same database installation / update code we run at the end of a successful installation / update also always runs every single time you access the Akeeba Backup control panel page. That is to say, if you have visited the Akeeba Backup control panel page at least once in the last year and you didn't get that error on that particular site you have proven that the issue does not come from Akeeba Backup itself.

Finally, I'd like to point out that you are using MariaDB, not MySQL, on your site. Even though they are nominally compatible with each other the Joomla! project only confirms that the Joomla! CMS runs on MySQL proper.

I hope this helps you narrow down your issue.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

duanemitchell
Thanks Nicholas. I did not expect the error to come from your code but thought maybe you had some information about it. I am on a Rochen server which is the official host of Joomla and all their db's are MariaDB now. Also, my other sites updated just fine so I know it's something about this site. Not Akeeba, Joomla, or MariaDB.

It's a bit of a problem since I can't update now. Just tried to upload manually and that did not work. I'll look into it some more.

nicholas
Akeeba Staff
Manager
Following your ticket I migrated one of my Linux dev environments to MariaDB. I have been able to install and use Akeeba Backup just fine. Moreover, my own blog is hosted on Rochen and I can tell you with absolute certainty that Akeeba Backup is installed, regularly updated and operating just fine - I have the daily backups on my S3 account to prove it, too!

If you are wondering what is going on, Akeeba Backup uses its own database driver layer. This is necessary when taking a backup from the command line. When we are running inside Joomla!, however, we just use a Decorator to piggyback on Joomla's database driver. Basically, we have a "dummy" driver which does nothing more than pass information between the Akeeba Engine and the Joomla! database driver using a stable API. I am wondering if Joomla! or a 3PD extension is doing something silly. In this case I have thought of possible workarounds, I just haven't enabled them in our code yet.

So first I am wondering what kind of database driver is being used by Joomla!. Take a look in your configuration.php file and find the $dbtype line. Does it read mysql, mysqli or pdomysql? If it reads something else please let me know.

Moreover, I would like to know if you have installed either Falang or any JoomlaTools extension (or if the Koowa system plugin is enabled). These extensions override Joomla's database driver and erroneously report "mysql" as the driver name. On PHP 7 this driver does not exist, therefore we use a special workaround.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

duanemitchell
There is no doubt in my mind that this is NOT an Akeeba Backup issue. As such I greatly appreciate any efforts you make. This is just one of several site I have and all the rest work fine. It's something about this site.

My $dbtype=mysqli

I do not use Falang or any JoomlaTools extension. I try to keep my sites lean when it comes to extension. I am using a RocketTheme template on the Gantry 4 Framework with some RocketTheme plugins. Gantry was updated this past July.

I don't have to fix this right away. This is the sort of thing that interests me. I always want to know why?

nicholas
Akeeba Staff
Manager
Yeah, I always want to know why as well. The first thing I was taught in Mechanical Engineering school is "don't ask why it does or doesn't work, but why". That was word for word the first thing we were taught :D

I am wondering if the PHP version has something to do with it. Can you try downgrading to PHP 5.6 and retry?

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

duanemitchell
I am also using K2 and sh404SEF along with several RocketTheme plugins.

Downgrading PHP did not work. I'm going to try turning off extensions.

duanemitchell
I just tried to update sh404SEF and got the same error.

duanemitchell
I turned off all extensions. Turned them on one at a time. That worked until I got to the RocketTheme extensions. Will try to find out which one.

duanemitchell
I've determined that the culprit is the RocketTheme extension RokUpdate 1.0.8 with a date of November 5, 2013.

My solution for now is to turn it off. Make updates and then turn it back on.

nicholas
Akeeba Staff
Manager
I believe that extension installs a plugin in the "installation" group which gets activated every time Joomla! tries to install anything (new extension or update). Since such a plugin runs after the download of an update package / after the upload of an installation package but before its installation I can understand why you'd get confused.

For what it's worth this is the exact reason I told the people who implemented that feature in Joomla! (themselves extension developers) that it's a misguided feature. That was four years ago (oh, the irony). I was pretty sure that someone would drop the ball with one of these plugins and an unrelated extension developer would get the support burden and / or the blame. You are a reasonable person who asked politely and trusted my reasonable reply. I wonder how many people thought "I am not gonna use Akeeba Backup / sh404SEF / whatever because the crappy thing won't even install, God knows if it won't f**k up my site completely" because RocketTheme's army of outsourced, underpaid, overworked, dismal code churners dropped the ball. If only someone would have predicted that problem. Oh, wait... * sigh *

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

duanemitchell
I recall when you posted about that issue several years ago. I imagine it is a big problem for developers. Users just want things to work and don't invest in finding out why. Too bad.

Meanwhile, I'll take this over to RocketTheme and see what they have to say.

BTW, I've been around this business long enough to know it's more important as to who you work with than the product itself. I appreciate your support.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!