PHP 7.x Issue? Database error 2014 while doing query Commands out of sync; you can't run this command now

After upgrading to PHP 7 I am now seeing this error when I process bounces…and I am not sure bounces are being removed (I no longer see the email showing the removals).

Database error 2014 while doing query Commands out of sync; you can’t run this command now

No reply so far? Is PHPList compatible with PHP 7 ?
My testing says NO.

@keeenone Please provide more information about the problem and your configuration. The phplist release that you are using would help, also the mysql release.
Does the problem happen elsewhere in phplist, or only in process bounces. It is not clear from your description whether bounces are being retrieved and processed - that should be clear from the view bounces page.

1 Like

So far the issue seems to be with processing bounces, but naturally I started running PHP 5.6.x shortly after finding out that bounces were not processing. I am running:
PHP Version 7.0.24
phpinfo

MySQL Version 5.5.5-10.0.32-MariaDB
SQL Toolbox

Again, when running process bounces I get this error: “Database error 2014 while doing query Commands out of sync; you can’t run this command now”

@keeenone The text that you copied doesn’t have the query that is causing the problem.

You can try making a small change to phplist to show the query. In file admin/mysqli.inc lines 180-185 are

if (!$ignore) {
    if (Sql_Check_Error($GLOBALS["database_connection"])) {
#      dbg("Sql error in $query");
        cl_output('Sql error ' . $query);
    }
}

Try adding this line immediately after the cl_output line

logevent($query);

Then hopefully the query will be written to the event log.

Also, you didn’t say which release of phplist you are using.

I am using version 3.3.1, and must say that I’m not planning on running PHP 7.x again until bounce processing is working…I do know that it wasn’t working in my setup. I guess this means I won’t be able to add these code bits to test for you…sorry. I was hoping to see if anyone else is having this issue using PHP 7.x.

Same problem:
debian9
php7
phplist 3.3
mariadb

white page on the browser, but from chrome webtools I can see this error twice:
Database error 2014 while doing query Commands out of sync; you can’t run this command now
Database error 2014 while doing query Commands out of sync; you can’t run this command now

@utz.paolo Tried following @duncanc’s advice?

@samtuke Yes, tried but looking in both apache error log and phplist eventlog I find no queries.

@utz.paolo To make progress with diagnosing the issue, being able to debug the MySQL query / error is essential.

I definitinely agree, but @duncanc 's advice seems not to be enough to write in the log and can’t find that query anywhere else.
found it at last: select * from phplist_bounce where status = “unidentified bounce”

@utz.paolo From phpmyadmin try repairing the bounces table, see https://dba.stackexchange.com/a/183010

@duncanc the table is fine and that query works from mysql, I now switched to phplist-3.3.4 but the error is still present.

I have the same problem.
Have you solved it?
Solves the version 3.3.5 it?

Update to version 3.3.5 don’t solves the problem.

Having this same issue with v3.3.9. It worked fine when I had like 300 bounces. Now I have about 1200.

phpList - Processing bounces based on active bounce rules
phpList - processed 500 out of 971 bounces for advanced bounce rules
phpList - processed 1000 out of 971 bounces for advanced bounce rules
phpList - Database error 2014 while doing query Commands out of sync; you can’t run this command now
phpList - Database error 2014 while doing query Commands out of sync; you can’t run this command now
phpList - Database error 2014 while doing query Commands out of sync; you can’t run this command now

My guess is that the error is in processbounces.php around or after this line, but I haven’t been able to identify the query that’s causing it:
cl_progress(s(‘processed %d out of %d bounces for advanced bounce rules’, $counter, $total));

Changed the batch size to 250 in processbounces.php and it worked.
$batchSize = 250; //# @TODO make a config, to allow tweaking on bigger systems

1 Like