Best PhpList Tips, Tricks and Tutorials
PhpList is the best free mailing list script out there. On this page, over time I would like to assemble the best tips and resources for PhpList.
PhpList Install Tips
PhpList Install Problem 1: Magic Quotes. You've just installed phpList with Fantastico. You get this message in red: "Warning: Things will work better when PHP magic_quotes_gpc = on". If you're on a host that has CPanel, such as Hostgator, navigate to the near bottom of CPanel, in the Software / Services section, and locate Php.ini QuickConfig. There, in two clicks, you can turn on magic_quotes_gpc.PhpList Install Problem 2: confirmation emails. You can subscribe, but confirmation emails are not going out. (You may have this problem if you do a manual installation.) You're probably in test mode. In config/config.php, find this line:
define ("TEST",0);Replace the 0 with a 1.
PhpList Install Problem 3: no newsletters available. You've created and activated a list. It shows on your subscribe page. You click on it, and it says "Sorry there are currently no newsletters available". On the admin page, you need to click on "Subscribe Pages", create a page, and, MOST IMPORTANT, all the way at the bottom, associate it with your list ("Select the lists to offer").
PhpList Install Problem 4: ugly pages. Your list is up and running, but it looks terrible! How to change the look of the subscription pages? On the admin page, click on "Subscribe Pages". Edit the page you are using. Using a standard page of your website, copy all the code of the page up to the point where text starts to appear, and paste that in the Header section. Copy all the code after the end of your standard page's text, and paste it in the Footer section. If you are linking to any stylesheets or graphics, replace the links with hard links (not relative links so the template knows where to pull them from). You can also do some nice h1 and font work in the intro section.
PhpList Install Problem 5: blacklist data. You try to unsubscribe or check the database. This error appears: "error 1146 phplist_user_blacklist_data' doesn't exist". If you have CPanel, in Databases, locate phpMyAdmin and click on it. If you're on a host that doesn't have CPanel, such as FutureQuest, download phpMyAdmin, install it on your server and follow the same instructions. This program lets you manipulate your mySQL databases. In MyAdmin, click on your database for phpList, then click the small SQL button. In the box, paste the following, then click Go. That's it.
DROP TABLE IF EXISTS `phplist_user_blacklist_data`;
CREATE TABLE `phplist_user_blacklist_data` (
`email` varchar(255) NOT NULL default '',
`name` varchar(100) default NULL,
`data` text,
UNIQUE KEY `email` (`email`)
) TYPE=MyISAM;
PhpList Install Problem 6: reasons for unsubscribing. Remove the "Reasons for unsubscribing" box.
In config/config.php, find
UNSUBSCRIBE_JUMPOFF, set it to 1:define("UNSUBSCRIBE_JUMPOFF",1);There is also a fix to apply in index.php on line 730 (phplist version 2.10.10) or 717 (version 2.10.9). Replace
}else{ with:} elseif (!UNSUBSCRIBE_JUMPOFF) {
PhpList Install Problem 7: Double Header. Straight after unsubscribing, you try to resubscribe and land on a horrible page within a page. The email has been blacklisted. The slow fix: in phplist admin, click on the user, click on "history", remove the user from blacklist. The fast fix, if you've had this problem for a while and have loads of test email addresses to remove from the blacklist: open phpMyAdmin, open the database, clear the offending records from the two blacklist tables (user_blacklist and user_blacklist_data).
PhpList Install Problem 8: custom messages. How to customize messages on landing pages after subscribing, unsubscribing, etc.?
Open the file called "texts/english.inc", look for the offending text and replace it with something suitable, including header and font tags if you like. Here are the ones I changed.
$strRequired= '';
$strEnterEmail= 'Please enter your email address';
$strUnsubscribeDone= '<br><br>You have been unsubscribed from our newsletters and you will receive confirmation by email soon.<br>';
$strUnsubscribeInfo= '<h1><font face="Arial, Helvetica, sans-serif" size="5"><br>Unsubscribe</font></h1><br>';
$strUnsubscribeRequestForReason = '<br>Leave blank (we could not figure out how to remove this box)';
$strUnsubscribeFinalInfo = '';
$strConfirmInfo = '<h1><font face="Arial, Helvetica, sans-serif" size="5"><br>Thank you for confirming.</font></h1><br>You are subscribed to:<br>';
$strPreferencesInfo= '<br>Please confirm that the information below is correct and click the "Update" button<br>';
$strPreferencesUpdated = '<br>Thank you for your submission. We have updated your information.';
There are many more config options in config/config.php.
Upgrading from PhpList 2.10.9 to 2.10.10
This sounded scary but it wasn't so bad. However, Hostgator users may encounter a 500 error when trying to open the admin page on step 4. What worked for me was to delete the htaccess files in the root, admin and config folders; to run the admin panel and upgrade the database; then, and only then, to upload the three htaccess files again (I used the ones from the old installation). The htaccess file is definitely needed in the root so it knows to execute index.php.1. Backup your database (if you have CPanel, choose Backups from the Files section).
2. Download the TGZ file. Upload. Unpack. Grab the Lists folder under public_html. Rename it list10, move it to your root. This is your new installation, which can be renamed later. Delete the other files.
3. Grab config.php in your old config folder. Edit these two variables:
$pageroot = '/list10';
$adminpages = '/list10/admin';
Overwrite config.php in list10/config.4. Open list10/admin. Under System functions, select "Upgrade" to upgrade the database. While you're there, if you look around, you'll see that your subscribe pages are all there!
5. In the "Configure" page, scroll down to the section with URLs, and edit the six URLs so they all point to list10
6. Grab texts/english.inc from your previous installation, overwrite the file in the new installation.
7. If you do not want to display a box asking for a reason for unsubscribing and you have already set UNSUBSCRIBE_JUMPOFF to 1 in config.php, open index.php and find the piece of code with:
if ($blacklist) {
$res .= $GLOBALS["strExplainBlacklist"];
} else {
list($r,$c) = explode(",",getConfig("textarea_dimensions"));
It should be on line 728. Replace line 730 (
} else { ) with} elseif (!UNSUBSCRIBE_JUMPOFF) {
8. Make a test web page that points to /list10/?p=subscribe
Open it and check that everything runs.
9. Either point your site's newsletter page to the new list10 folder, or rename the old lists folder, then rename list10 to lists (you will also have to modify config.php to correct the two variables from step 3).
Upgrading from PhpList 2.10.10 to 2.10.11
This was much easier than last year! PhpList 2.10.11 fixed the bug that showed a "confirm to unsubscribe" message even if you didn't want it.1. Rename your old installation folder something like "listsbak"
2. Upload, unpack, and MOVE the new /lists folder (in phplist-2.10.11/public_html) next to your old install folder (now listsbak).
3. Backup your database: if you have cPanel, go into phpMyAdmin; if you have neither cPanel or phpMyadmin, install phpMyadmin and run it; open the database; at the bottom of the tables, check "Check All"; at the top, choose "Export"; leave all the settings as they are and save on your desktop.
4. Make a safe copy of your old htaccess files in lists/ and lists/admin. This is your key in case the new htaccess file does not work with your server settings! Check if you had something special in the file that is not in the new htaccess, such as an authorization for a script of yours.
5. In lists/texts/, overwrite english.inc with the old one if you had modified some of the messages.
6. Edit the new config.php. (You can also overwrite it with the old one, but I like editing it in case something has changed.)
- Edit parameters, specifically $database_name, $database_user, $database_password. If you're not using the default folder ("lists"), change $pageroot and $adminpages. In lists/, you may need to create an attachments folder to match the setting in $attachment_repository (if not, you may get an error message later).
- Using the find function, change a few parameters—set the script out of test mode and modify custom parameters to your liking, e.g.:
define ("TEST",0);
define("UNSUBSCRIBE_JUMPOFF",1);
define ("REGISTER",0);
define("EMAILTEXTCREDITS",1);
define("PAGETEXTCREDITS",1);
define('USE_ADMIN_DETAILS_FOR_MESSAGES',0);
7. Login to the Admin account. If you get a 500 error, try overwriting htaccess with the old one in listsbak.
8. In the Admin panel, click on "Upgrade". If your old installation was not in a folder called "lists", click on "Configure" and "Subscribe Pages" and make sure that everything points to "lists/".
9. On your site, make sure everything points to lists/.
10. Do a full "round trip" (subscribe and unsubscribe a user) to make sure everything works. All done! Yeah!!!
Upgrading from PhpList 2.10.11 to 2.10.12
Same as 2.10.10 to 2.10.11.Other awesome PHP scripts
I document all the scripts I use. Go to the top of the page and have a look at my other PHP articles in the right column!Smiles,
Andy
ps: If you have enjoyed this page, I would be immensely grateful if you would link to it, bookmark it or share it. You can also comment using the form below.
this was extremely helpful. thanks for taking the time to put it all together.
Thank you!! I had been having this problem on my phplist as well. Having searched around for a solution, yours was the easiest to understand and helped me fix it! All working now!!
Now...just the "process bounces" to get fixed - google here I come!!
I had Problem #5 & #7. You fixed them both. Thanks a million!
I jst installed phplist at gurutalks dot com / list
the problem I have..if you check above url at the bottom of it..simple script and my hosting company have given their links..I want to know how to replace those links with my affiliate id.
Thanks,
Hi Sandeep,
Just take the important part of that page (the subscribe / unsubscribe links) and paste them on a page that's more to your liking.
Warm wishes,
Andy
I followed all the info but am getting an error when I go to Send A Message or Add User. I just get "Internet Explorer cannot display the webpage.". really odd as everything else seems fine.
Any ideas?
Hi Jackie,
Strange indeed, as it sounds like the Admin menu is working and you have been able to connect to the database. Wondering if this could have something to do with your IE cache, or be a browser-specific glitch because of certain settings. Have you tried from another browser (Firefox?) If that works, then to get it to work in IE you can clear your cache. Otherwise, I'd suggest getting onto the phplist forum for expert help 
Wishing you a fun day,
Andy
Hi, I know this can't be done, but I REALLY REALLY REALLY want my Users / Subscribers, NOT to Confirm their subscription anymore.
I think this requires hacking modifying the code, where do I start? Pls.... Thanks.
Hi we use Drupal with Phplist and with the rewritten module that integrates Phplist with Drupal you don't need to confirm.
