back to phpList.org

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


#1

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


#2

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


#3

@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.


#4

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”


#5

@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.


#6

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.


#7

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


#8

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


#9

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


#10

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


#11

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”


#12

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


#13

@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.