Phplist: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
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. | 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): | |||
<pre> | |||
[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 | |||
</pre> | |||
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 <ref>https://github.com/paragonie/random_compat/issues/99</ref>) 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 <ref>https://github.com/paragonie/random_compat/blob/master/RATIONALE.md</ref>. | |||
<pre> | |||
yum install php-pecl-libsodium | |||
httpd -t && service httpd restart | |||
</pre> | |||
For more information about this issue and its fix, see | |||
* https://tech.michaelaltfield.net/2018/08/25/fix-phplist-500-error-due-to-random_compat/ | |||
=Troubleshooting= | |||
=See Also= | =See Also= | ||
* [[Email List]] | * [[Email List]] | ||
* [[OSEmail]] | * [[OSEmail]] | ||
[[Category: Software]] | [[Category: Software]] |
Revision as of 21:27, 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