Skip to content

Campaign sent to 0 recipients (Ubuntu & PHP 7)

edited January 2017 in Troubleshooting

I updated to Ubuntu 16.04 LTS which ships with PHP7 by default. I reinstalled the typical necessary PHP7 modules (php7.0-mysql php7.0-xml libapache2-mod-php7.0 php7.0-curl and then phpenmod curl phpenmod xml phpenmod xmlreader phpenmod simplexml) and restored functionality to all my sites except for Sendy.

When I send a campaign, no matter which list I choose, it will act as if it has sent the campaign instantly. When I view the report, it says it has sent the campaign to 0 recipients.

I'm at a loss since I don't know what else I could be missing that could be causing this error. Any help is greatly appreciated.

Comments

  • BenBen
    edited January 2017

    Sendy is tested and works on PHP 7.

    Can you please login to MySQL via SSH, then run select @@sql_mode; and let me know what's the result?

  • Thank you so much for your help, Ben. Here's the MySQL response:

     +------------------------------------------------------------------------------------------+
     | @@sql_mode
     +------------------------------------------------------------------------------------------+
     | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,
       ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
     +------------------------------------------------------------------------------------------+
     1 row in set (0.00 sec)
    
  • BenBen
    edited January 2017

    Can you please remove ONLY_FULL_GROUP_BY from the list?

  • edited May 2022

    You are the man, Ben. Issue is resolved after removing ONLY_FULL_GROUP_BY from 'sql_mode'.

    Here's how I permanently removed ONLY_FULL_GROUP_BY from sql_mode if it will help anyone else:

    sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf (location will vary, but this is where mine was)

    Paste the following at bottom of [mysqld] section

    sql_mode = "ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
    ^ Basically whatever sql_modes you wish to keep, making sure that ONLY_FULL_GROUP_BY is not in this list.

    Save and restart MySQL:

    sudo service mysqld restart or sudo /etc/init.d/mysql restart

    Thank you again for all your assistance! You rock.

  • Glad to hear you resolved it. :) Thanks for sharing.

  • I setup Sendy on a DigitalOcean droplet with an Ubuntu LAMP on 18.04 image. I ran into the ONLY_FULL_GROUP_BY warning/error.

    I'm running (5.7.30-0ubuntu0.18.04.1) on a newer MySQL version.

    I had to use sql-mode instead of sql_mode (notice the hypen instead of the underscore).

    Also, sudo service mysqld restart didn't work for me, got error Failed to restart mysqld.service: Unit mysqld.service not found..

    sudo service mysql restart seemed to work on my end, Sendy stopped yielding the warning after that.

This discussion has been closed.