Saturday, January 17, 2009

PHPlist 2.10.7 installation, configuration and troubleshooting

I installed PHPList 2.10.7 using Fantastico Deluxe with my UTF-8 MySQL. On the first install it gave me errors telling that phplist_users_users table does not exist.

'phplist_user_blacklist_data' database error

I went to 'main page'->'setup'->'Database Initialization' and re-built the DB. This time it was almost OK. Another error remains, saying
'phplist_user_blacklist_data'
Database error 1071 while doing query Specified key was too long; max key length is 1000 bytes
still appeared.
Looking how to fix that I found this thread:
http://forums.phplist.com/viewtopic.php?t=8150
and like it was suggested changed 'email' field size in admin/support.php from 255 to 233, then re-run DB init.
This solved the issue.

Database error 1146

However, the work was far of being done yet.
Next issue - a DB error again, now when I tried to import first entries from a CSV file.
Database error 1146 while doing query Table 'phplist . user_group' doesn't exist
Two ways to solve it are discussed in this thread http://forums.phplist.com/viewtopic.php?t=21789
I found that for me it will be easier to add a DB table with phpMyAdmin using this SQL from the thread above:

CREATE TABLE `user_group`
`userid` int(11) NOT NULL auto_increment,
`groupid` int(11) NOT NULL,
PRIMARY KEY (`userid`)
ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1

The import errors disappeared.

Cannot delete users

I imported nearly 2,000 entries, but I found that phpList is unable to delete these users once imported! I wanted to fix a few things in Excel / CSV and re-import the list again, but could not do it since I could not remove the existing users from the PHPlist UI.
"delete all unsubscribed users" function just did nothing!
PHPList also did not show the list of users, - the search did not work at all, so I could not even remove them one by one.

No users show up in search

For the search users / show users I found that the solution
http://forums.phplist.com/viewtopic.php?t=22619
works - the users are shown now (i used option 1, editing 'users.php' file)
I tried if by any chance it also solved
the "delete all users who are not subscribed to any list" issue, but no it did not.
Still no users can be deleted.

More and more it looks like a "do-it-your-self" solution :-)

I looked for the intelligent solution to remove users for a few hours but found nothing.
So I just deleted all rows in the following tables in phpMyAdmin:
- user_group
- phplist_user_user_attribute
- phplist_user_user
This worked great and I was able to start from teh very beginning, now doing all teh editing in CSV file before I import it to PHPlist.

International customization - Russian and English lists - UTF-8

I wanted to handle two lists, one in English and one in Russian. My admin PHPList pages always came up with ISO-Latin charset, so when I tried customizing Russian-list subscription page writing in some Russian I ended up with some garbage text that come up on "Save". Not exactly the garbage - there was a HTML presentation for every letter, but anyway it was absolutely useless.

So I need to switch my admin pages to UTF-8.
Looking into PHP code I found that the 'charset' header comes from file /admin/pagetop.php and the variable $strCharSet was defined in the /texts/english.inc (in my case) file.
It looked like changing the variable in the ".inc" file will also cause the changes in English emails charset (nothing wrong to have it UTF-8 there though, but anyway), so I just replaced
the tag above with a static UTF-8 definition:

Now my admin pages come up with UTF-8 encoding and I was able to create, edit, save and retrive back from my UTF-8 mySQL DB some texts in Russian

International customization - Russian and English lists - UTF-8

Upgrading to 2.10.8 with Fantastico I lost UTF-8. However the lists were already set up, so if I change View in my browser to UTF-8 it shows me strings in Russian.

PHPlist is probably the worst open source system I ever used, buggy, unstable and not ituitive for me

I sent out many emails with PHP list, but they all went out as pure text while I wanted them to be sent inside the HTML template. "Import users" did not mark that the users accept HTML and the all got pure text - very ugly! I sent thousands emails as a plain text before I found that!

I have huge troubles working with PHPlist. Many bugs and the interface is very unfriendly IMO.
It took me more than a week full time work to setup the first delivery of a newsletter (and it went out as a text, not as HTML).

In order to delete users you should first unconfirm them. Then you can try to delete them. In my 2.10.8 the delete does not work.

Message goes to spam folder on Google

I make many tests at the beginning since every message I sent went to the spam folder on my Google testing account. I thought that was because of the inconsistency in the emails headers since the emails were sent from PHP mail() function, i.e. went out from my hosting provider and not through my SMTP server at "mydomain.com". So I tried to send them through my domain.
I changed config.php adding there the mailing host and account credentials. I needed to add a port somewhere since my hosting uses another SMTP port, not a default 25. I found that I have to add a variable in config.php and modify class.phplistmailer too to use another port.

Now emails went through SMTP but the 'junk' problem remains!
At the end, the reason was the FROM field in PHPlist message GUI: you have to put there a string like "Alex Smith " and check that such email account is valid and exists on 'smith.com' (better if it is your own domain, so you can just can add / control a dedicated email account there) . the space before "<" symbol is also important.

All in all - I had a very unpleasant experience with PHPlist, mostly because of unfriendly UI, limited functionality and bad workflow design (you have to go into three places in UI to do just one thing) and many bugs. Customization from UI is very limited too and if you can not edit PHP code for bugs and customization I do not think that PHPlist is an option for you. It just does not work 'out of the box'.

1 comment:

webstasy said...

All users can easily be made to receive HTML emails by using the "manage users/reconcile users" & 'mark all users to have HTML emails'.

I agree that PHPList is no out of the box solution. But it is highly configurable, provided you devote time to learn it. Problem with PHPList is that, unless tested thoroughly, many things (which are going wrong) you won't come to know at all.