A Quick Guide to installing (v.3)

Discussion about the phpList community

A Quick Guide to installing (v.3)

Postby Dragonrider » 9:36am, Sat 15 Mar, 2014

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 is a value you may need or wish to alter.
$pageroot = '/lists';

Set this to point to your phpList installation, phpList defaults to lists 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). In Version 3 the $adminpages is not defined but assumed to be $pageroot/admin.

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

Please note: phpList expects to find a config.php file, this can be either the smaller, "quick start" config.php file OR the larger, full version config_extended.php file, BUT you must rename this to config.php if you expect phpList to use this full version config file.

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 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
ALTER DATABASE databasename DEFAULT CHARACTER SET latin1


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`)
) TYPE=MyISAM;


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.

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. 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 213 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)
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
Dragonrider
Moderator
 
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom

Re: A Quick Guide to installing (v.3)

Postby Dragonrider » 3:49pm, Fri 14 Nov, 2014

Continued...

6. MySQL or MySQLi not being present Error
Note also that since PHP 5.5, MySQL is being degraded so if you get an error along the lines of MySQL or MySQLi not being present, the solution is to include the following line within your config.php file, replacing the existing one. It just adds a lower case i after the mysql and before the .inc. Having said that, your server still needs MySQL version 5.0 or higher and PHP should be version 5.3.x or Higher.

7. I cannot export Subscribers.
This issue occurred in version 3.0.9-3.0.10 and the solution is quite simple and can be found here. It has been fixed in the later versions.
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
Dragonrider
Moderator
 
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom


Return to Community

Who is online

Users browsing this forum: No registered users and 1 guest