I’ve used phplist on my server for a number of years but recently decided to move to the Debian OS. While I had initially hoped to simply move the databases from the old installation, I find that Debian now more or less requires use of the mariadb database. Even starting with a clean installation, I receive error 1064 trying to set up the phplist tables. It seem installing Mysql on Debian also poses some major hurdles. Is there a way to use phplist with postgres (which I am much more familiar) or trick maraibd to act like mysql?
Thanks.
Update. I gave up on installing mysql on the new Debian server and installed a new Ubuntu server (26.04) system. The mysql database server installed much easier on Ubuntu; however when I installed the phplist (3.6.16) the same syntax errors arose, unable to write to the database. Once the login is entered, it takes about 3 minutes for phplist to open and then has a few hundred lines of error messages partially shown below.This is the same result when I was using Mariadb on Debian. Both Debian and Ubuntu are clean installs from an iso.
Database error 1064 while doing query 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 ‘EN">"’ at line 1
Database error 1064 while doing query 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 ‘EN">" and lastmodified >= 1778290769’ at line 1
Database error 1064 while doing query 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 ‘EN">"’ at line 1
Database error 1064 while doing query 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 'EN">“,1778290769,now(),”\n\n\n
Database error 1064 while doing query 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 ‘utf-8">"’ at line 1
Database error 1064 while doing query 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 ‘utf-8">" and lastmodified >= 1778290769’ at line 1
Database error 1064 while doing query 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 ‘utf-8">"’ at line 1
Database error 1064 while doing query 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 'utf-8">“,1778290769,now(),”\n\n\n
Database error 1064 while doing query 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 ‘viewport" content=“width=device-width, initial-scale=1.0”>"’ at line 1
Database error 1064 while doing query 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 'viewport" content=“width=device-width, initial-scale=1.0”>" and lastmodified >= ’ at line 1
Database error 1064 while doing query 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 ‘viewport" content=“width=device-width, initial-scale=1.0”>"’ at line 1
Database error 1064 while doing query 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 'viewport" content=“width=device-width, initial-scale=1.0”>“,1778290769,now(),”
Database error 1064 while doing query 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 ‘X-UA-Compatible" content=“ie=edge”>"’ at line 1
Database error 1064 while doing query 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 ‘X-UA-Compatible" content=“ie=edge”>" and lastmodified >= 1778290769’ at line 1
Database error 1064 while doing query 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 ‘X-UA-Compatible" content=“ie=edge”>"’ at line 1
Database error 1064 while doing query 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 'X-UA-Compatible" content=“ie=edge”>“,1778290769,now(),”\n
Database error 1064 while doing query 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 ‘stylesheet" href=“/assets/v2/css/main.css”>"’ at line 1
Database error 1064 while doing query 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 ‘stylesheet" href=“/assets/v2/css/main.css”>" and lastmodified >= 1778290770’ at line 1
Database error 1064 while doing query 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 ‘stylesheet" href=“/assets/v2/css/main.css”>"’ at line 1
Database error 1064 while doing query 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 ‘stylesheet" href=“/assets/v2/css/main.css”>“,1778290770,now(),”\n’ at line 2
Database error 1064 while doing query 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 ‘.1.min.js">“’ at line 1Database error 1064 while doing query 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 '.1.min.js”>" and lastmodified >= 1778290770’ at line 1
Database error 1064 while doing query 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 ‘.1.min.js">"’ at line 1
Database error 1064 while doing query 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 '.1.min.js">“,1778290770,now(),”\n\n
Database error 1064 while doing query 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 ‘setCustomDimension" should be called before “trackPageView” */"’ at line 1
Database error 1064 while doing query 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 ‘setCustomDimension" should be called before “trackPageView” */" and lastmodified’ at line 1
Database error 1064 while doing query 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 ‘setCustomDimension" should be called before “trackPageView” */"’ at line 1
Database error 1064 while doing query 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 ‘setCustomDimension" should be called before “trackPageView” */",1778290770,now()’ at line 2
Database error 1064 while doing query 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 ‘page">" and lastmodified >= 1778290770’ at line 1
Database error 1064 while doing query 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 ‘page">"’ at line 1
Database error 1064 while doing query 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 'page">“,1778290770,now(),”\n\n\n
Database error 1064 while doing query 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 ‘main_image">"’ at line 1
Database error 1064 while doing query 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 ‘main_image">" and lastmodified >= 1778290770’ at line 1
@cwels From where did you obtain the phplist zip file?
Which version of php are you using?
It looks like phplist is getting the source of a web page from somewhere when it is expecting something else, possibly when trying to update translations.
The sql error messages include text such as
setCustomDimension" should be called before “trackPageView
Does that mean anything to you?
That looks to be something to do with matomo.
Thank you Duncanc. I’ve downloaded both 3.6.15 and 3.6.16 from the phplist.org site. I’ve used the tar utility to decompress the file (I also for one try used the zip file). The general format of the code snippet you noted I presumed was caused by the program not correctly accessing the database files but other than that I don’t have any idea about the specifics of the database/program interactions including this. I have been copying my config.php file from my prior (working) setup copied below. I’m currently using php8.4 trying both Debian and Ubuntu servers. I did also try setting up a clean install without my prior data uploaded to the databases but still receives the error messages. Here’s my config file. Everything else has not been altered from the original tar file.
<?php
/*
* ==============================================================================================================
*
*
* The minimum requirements to get phpList working are in this file.
* If you are interested in tweaking more options, check out the config_extended.php file
* or visit http://resources.phplist.com/system/config
*
* ** NOTE: To use options from config_extended.php, you need to copy them to this file **
*
==============================================================================================================
*/
// what is your Mysql database server hostname
$database_host = 'localhost';
// what is the name of the database we are using
$database_name = 'phplist3';
// what user has access to this database
$database_user = '*******';
// and what is the password to login to control the database
$database_password = "********";
// if you have an SMTP server, set it here. Otherwise it will use the normal php mail() function
//# if your SMTP server is called "smtp.mydomain.com" you enter this below like this:
//#
//# define("PHPMAILERHOST",'smtp.mydomain.com');
define('PHPMAILERHOST', '********');
$phpmailer_smtpuser='**********';
$phpmailer_smtppassword="****************";
//define('PHPMAILERHOST', '*******');
//$phpmailer_smtpuser='*********';
//$phpmailer_smtppassword='************';
//
//
// if TEST is set to 1 (not 0) it will not actually send ANY messages, but display what it would have sent
// this is here, to make sure you edited the config file and mails are not sent "accidentally"
// on unmanaged systems
define('PHPMAILER_SECURE', 'tls');
//define('PHPMAILER_SMTP_DEBUG', 3);
define('PHPMAILERPORT', 587);
define('TEST', 0);
$pageroot= '/phplist/public_html/lists';
define('ALLOW_ATTACHMENTS', 1);
$attachment_repository = '/website/www/phplist/public_html/documents';
/*
==============================================================================================================
*
* Settings for handling bounces
*
* This section is OPTIONAL, and not necessary to send out mailings, but it is highly recommended to correctly
* set up bounce processing. Without processing of bounces your system will end up sending large amounts of
* unnecessary messages, which overloads your own server, the receiving servers and internet traffic as a whole
*
==============================================================================================================
*/
// Message envelope.
// This is the address that most bounces will be delivered to
// Your should make this an address that no PERSON reads
// but a mailbox that phpList can empty every so often, to process the bounces
// $message_envelope = 'listbounces@yourdomain';
// Handling bounces. Check README.bounces for more info
// This can be 'pop' or 'mbox'
$bounce_protocol = 'pop';
// set this to 0, if you set up a cron to download bounces regularly by using the
// commandline option. If this is 0, users cannot run the page from the web
// frontend. Read README.commandline to find out how to set it up on the
// commandline
define('MANUALLY_PROCESS_BOUNCES', 1);
// when the protocol is pop, specify these three
$bounce_mailbox_host = 'localhost';
$bounce_mailbox_user = 'popuser';
$bounce_mailbox_password = 'password';
// the "port" is the remote port of the connection to retrieve the emails
// the default should be fine but if it doesn't work, you can try the second
// one. To do that, add a # before the first line and take off the one before the
// second line
$bounce_mailbox_port = '110/pop3/notls';
//$bounce_mailbox_port = "110/pop3";
// it's getting more common to have secure connections, in which case you probably want to use
//$bounce_mailbox_port = "995/pop3/ssl/novalidate-cert";
// when the protocol is mbox specify this one
// it needs to be a local file in mbox format, accessible to your webserver user
$bounce_mailbox = '/var/mail/listbounces';
// set this to 0 if you want to keep your messages in the mailbox. this is potentially
// a problem, because bounces will be counted multiple times, so only do this if you are
// testing things.
$bounce_mailbox_purge = 1;
// set this to 0 if you want to keep unprocessed messages in the mailbox. Unprocessed
// messages are messages that could not be matched with a user in the system
// messages are still downloaded into phpList, so it is safe to delete them from
// the mailbox and view them in phpList
$bounce_mailbox_purge_unprocessed = 1;
// how many bounces in a row need to have occurred for a user to be marked unconfirmed
$bounce_unsubscribe_threshold = 5;
// choose the hash method for password
// check the extended config for more info
// in most cases, it is fine to leave this as it is
define('CLICKTRACK',0);
define('HASH_ALGO', 'sha256');
@cwels The phplist.org site has two links, one to GitHub and a second to SourceForge. You need to use the SourceForge link.
I imagine that the database has been created correctly. You can check that using phpmyadmin or a similar program. Also look at the i18n table to see whether that has been populated.
Looking at the config.php file, this setting is not correct
$pageroot= '/phplist/public_html/lists';
It should be the path from the web root not the file sysetm path so probably
$pageroot = '/lists';
Does this mean that /website/www is the web root directory? In that case, you need to move the lists directory to be within that directory. You shouldn’t have public_html as part of the path. Then you access phplist as https://website/lists for the public pages and https://website/lists/admin for the admin pages.
@duncanc Thank you for your help. I finally succeeded in running the new install of phplist on Debian. After many trials and errors I created a new database (mariadb), deleted cache and cookies (even though I had thought I had purged everything), and did a clean install. After the install had initialized the database, I went back and uploaded the previous sql dump. I also have cleaned up the structure as you noted! All is good. Thanks again.