A quick guide to installing and common errors you may find.

Questions & Problems about Installing or Upgrading Version 2 phpList
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation. This is for Version 2 of phpList (the orange one).

A quick guide to installing and common errors you may find.

Postby Dragonrider » 6:38pm, Fri 29 May, 2009

If you can't be bothered to read the instruction Documents included within the phpList ZIP or on the Doc's link above, here is a quick guide to installing phpList that's worked for me.

First, download the latest version of phpList from the download link. I use the ZIP version so this guide assumes you do too. Don't work from a Fantastico installation, ocassionally some files can be missed.

Open the ZIP on your pc, browse down the folder structure public_html to lists. Upload this (lists) folder to your webspace.

Go to your webspace control panel and create a database for phpList to use, making a note of it's name, username and password if different to your default password. If you have access to only one database, then take note of the required details for the config file.

Once this is done, you should open lists/config/config.php in a TEXT editor (not Word or similar) and near the top of the file are various vital settings, around lines 19-30. Here you set up your language file, then your database host (often "localhost" but not always, check with your host's info pages), db name, db username, db password.

Around line 50 there are two values you may need or wish to alter.
$pageroot = '/lists';
$adminpages = '/lists/admin';

Set these to point to your phpList installation, phpList defaults to list for the folder name, but you can change that as you wish, but not the admin folder name. The assumption is that lists is directly off your root directory/folder, if it is further down, simply add the folders between root and lists (eg: /sub/site/lists & the same for the $adminpages value as well.

Save your amended config file back to your server, over-writing the original default one.

Now, go to the phpList installation and see what happens. mydomain.com/lists/

What might happen
1. Red lines
of warnings about Error 1146 database table does not exist. That's what you want to see! Now go to mydomain.com/lists/admin/ and click the (orange) initialise database link.

That click takes you to the first install page and your database is initialised. Now click the main page or configure link on the right hand side, this takes you to the log into admin page, (log in default is admin and (p/w) phplist). Once on the main admin page, you can setup and configure (link) phpList as you require.

1a. Database error 1071 'Specified Key was too long' If you get this error on your database, it may be down to the fact that your server is running PHP5, a pretty straightforward answer comes from samtherobot in This Topic.
Run the following SQL code on the database with the Error 1071 using phpMyAdmin:
Code: Select all

Then run the phplist initialize. If you have already run it and it failed, make sure you delete all the phplist_ tables in that database before initializing again. (Use phpMyAdmin)

1b. 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 ') and phplist_user_user_attribute.attributeid = 1' at line (varies)
A user fix is available here, thanks to mdclayton and the file to edit is lists/admin/connect.php

1c. Database Error 1142 Possibly your host has limited the amount of database space you have access to, see this post for a possible solution.

1d. Database Error 1146 Database error 1146 while doing query Table 'database.phplist_user_blacklist_data' doesn't exist.
This occurs AFTER you have initialised the database (as at item 1 above).
A user fix is available here, thanks to AlexDimitrov and Heritage. Believed to be due to your host using MySQL5 and upwards. Apply the code below to your phpList database using phpMyAdmin via your webspace control panel.
Code: Select all
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`)

1e. Database Error 1146 Database error 1146 while doing query Table 'database.phplist_whatever' doesn't exist
This can occur when moving servers and your host has limited the amount of space available and there is insufficent room for the database to be setup/populated. Only seen this the once.

1f. Database Error 2006 Database error 2006 while doing query MySQL server has gone away
Various solutions have been suggested over the years, from "an error with your Database server, contact your host" to the database over time becomes fragmented. NYChris has put forward the fix for this issue. In this post Chris explains what happens, and in this post, Chris gives the code required to fix the issue. Follow the instructions carfefully! Enter the SQL Code one line at a time and wait for it to complete. Many thanks to NYChris!

2. Error 500! This usually means that your host is running an apache module for added security and the line in the lists/.htaccess file "php_flag magic_quotes_gpc on" needs either moving to a php.ini file, removing or "reming" (REMarkING) by prefixing the line with a hash. eg: "#php_flag magic_quotes_gpc on"

The php.ini file is one you usually have to create, again in a TEXT editor, and put in magic_quotes_gpc = on and save it to the lists folder as php.ini

2a. Error 500! This can also occur if your host has installed suexec, a php security module, and you have files with incorrect permissions. Files should be CHMOD'd to 644 normally, if you need to change the file CHMOD to 666, NOT 777 any more, and restore to 644 as soon as you have made the changes. Using phpList, it is unlikely you need to have file premissions other than 644. Folders/Directories should be 755 at all times.

3. IT'S ALL BLANK! Okay, remember the message on the Hitch Hikers' Guide to the Galaxy? Don't Panic!

This is usually down to an error creeping in when you altered the config.php file. This can be as minor as deleting a quote or semicolon when you set the database parameters. Go back in to config.php file, text editor, don't forget and look at each setting you changed.
Each of the lines you altered MUST end with a semi-colon (;) also if you accidently deleted a quote when setting the values for the database or lists paths, that can cause a blank page.

4. All I can see is the Config.php file! All my database passwords and stuff are visible! This one took a bit of solving. Did you edit the config file in Word or Frontpage perhaps? Whatever it was, it wasn't a text editor. Reload the config file from the phplist ZIP file and start afresh. Delete the config file from the server, you may need to try to access phplist again with the file missing, or clear your browser cache or both to clear the file from your browser.

Make the alterations and try again.

5. I've updated to 2.10.10 (or greater) and I've no message area!
Not sure if this is a bug, or just affects some users depending on the PHP version/Server settings. The fix is from Ted in this post. This requires editing of a phpList core file (admin/Send_Core.php). If you are inexperienced or unsure about editing a core file, I'll attach a copy of the edited file in a zip.

You may also need to clear your browser cache so you get the latest page to show, not a stored copy, for everything to work as it should. (Easiest way: CTRL + F5 together).

5a. I've updated to 2.10.10 and I can only view the first 50 members of a list!
When viewing the members list you can only see the first 50, clicking the > and >> links just reloads the first page. There is a user fix to the members.php file available here to download as a rar file, unpack it (WinRar required) and upload to your lists/admin folder. (I've added it to this post as a ZIP file for those without WinRar).

5c. I've updated to 2.10.12 and I've no message area!
A possible reason and solution is available in this post by H2B2.
One possible cause for this issue is that your PHP installation doesn't include the iconv module. You can check this by looking at your system details: lists/admin/?page=community

If the iconv module isn't included in YOUR PHP, you should be able to solve the problem by commenting or removing the following lines in send_core.php beginning at line 1032, i.e.:

Code: Select all
# $utf8_subject = $subject;
# $utf8_from = $from;
# if (strcasecmp($GLOBALS['strCharSet'], 'utf-8') <> 0) {
# $utf8_subject = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_subject);
# $utf8_from = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_from);
# }

6. Ready to go live?
One thing you must do once you are happy with everything you've done, is alter the TEST value in the lists/config/config.php file. It's around line 225 define ("TEST",1); Change the 1 (one) to a 0 (zero), resave your config.php file and now, when you process the queue, your message will be sent to your subscribers.
You can still test what a message will look like by putting your email address in the box at the bottom of the create a message pages, and clicking Send Test Message.

If you just have the free text editors that come with Windows, notepad or wordpad, consider EditPad (lite or pro), this is such an improvement on Note/Word Pad. It even recognises php files and colour codes them as well as numbering the lines. Lite is free, Pro is paid, but either are well worth downloading and trying.

Hope this helps get you started with phpList.
Dragonrider (a phplist user)
(3.9 KiB) Downloaded 885 times
(16.17 KiB) Downloaded 2193 times
Last edited by Dragonrider on 1:39pm, Tue 26 Feb, 2013, edited 17 times in total.
Reason: Added DB Error 2006 info and user fix.
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom

Re: A quick guide to installing phpList.

Postby Dragonrider » 6:05am, Wed 14 Oct, 2009

Rather than fill this topic up with discussions/issues, please use this topic for discussions and that way this topic can remain as a quick guide, easy to read and find the solutions.

Thank you.

Discuss this topic in: viewtopic.php?f=3&t=28666
My sites:- http://wharfedalefestival.co.uk, http://ilkleygardeners.org.uk, http://emergencyaid.net, http://dragonrider.co.uk
Latest phpList version is now 3.0.12 (3 February 2015) and requires a minimum of MySQL 5.0 and PHP 5.3.x
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom

Return to Installing & Upgrading

Who is online

Users browsing this forum: No registered users and 3 guests