Phplist: Difference between revisions
No edit summary |
No edit summary |
||
Line 27: | Line 27: | ||
=Troubleshooting= | =Troubleshooting= | ||
==Enable error logging== | |||
By default, phplist will suppress errors from being written to log files. To fix this, find calls to error_reporting(0) and change them to error_reporting(1) in the phplist source code. For example, '/lists/admin/index.php' and '/lists/admin/init.php'. | |||
=See Also= | =See Also= | ||
* [[Email List]] | * [[Email List]] | ||
* [[OSEmail]] | * [[OSEmail]] | ||
=References= | |||
{{Reflist}} | |||
[[Category: Software]] | [[Category: Software]] |
Revision as of 21:30, 25 August 2018
Phplist is a project for managing email lists. When OSE adopted it in 2018 for the OSE Newsletter, it was determined to be the most feature-rich FLOSS alternative to the gold-standard paid alternative, MailChimp.
Installation
Installation for phplist is fairly trivial. Their documentation leaves much to be desired, but it's fairly straight-forward
libsodium
Note that, while not strictly a requirement on their website, phplist does effectively require libsodium and the corresponding pecl libsodium php extension to be installed on our OSE Server.
Without it, the random_compat library will throw an exception (which, by default, phplist will suppress from being written to the error logs):
[Thu Aug 23 00:06:29.560157 2018] [:error] [pid 17617] [client 127.0.0.1:51262] PHP Fatal error: Uncaught exception 'Exception' with message 'There is no suitable CSPRNG installed on your system' in /var/www/html/phplist.opensourceecology.org/public_html/lists/admin/inc/random_compat/random.php:204\nStack trace:\n#0 /var/www/html/phplist.opensourceecology.org/public_html/lists/admin/defaultconfig.php(3): random_bytes(10)\n#1 /var/www/html/phplist.opensourceecology.org/public_html/lists/admin/index.php(103): require_once('/var/www/html/p...')\n#2 {main}\n thrown in /var/www/html/phplist.opensourceecology.org/public_html/lists/admin/inc/random_compat/random.php on line 204
This, in part, is due to the use of 'open_basedir' in our /etc/php.ini file to whitelist the directories in which php is permitted to execute. The official response from the maintainers (see issue #99 of the random_compat repo on github [1]) is to simply add '/dev/urandom' to 'open_basedir' in '/etc/php.ini'. That didn’t seem like the wisest option, so--instead--we just install libsodium. Indeed, libsodium is the preferred source of entropy for random_compat, anyway [2].
yum install php-pecl-libsodium httpd -t && service httpd restart
For more information about this issue and its fix, see
Troubleshooting
Enable error logging
By default, phplist will suppress errors from being written to log files. To fix this, find calls to error_reporting(0) and change them to error_reporting(1) in the phplist source code. For example, '/lists/admin/index.php' and '/lists/admin/init.php'.