PHP 8 Server 500 Error Issues

When running PHP 8 the unsubscribe and update preferences links in my emails do not work, and cause Server 500 errors:

  • To unsubscribe from this list visit Unsubscribe
  • To update your preferences visit this link

Is there a solution to this issue?

@keeenone Please explain which versions of php and phplist you are using. I don’t have a problem using php 8.1 and phplist 3.6.7 with the preferences page.

It would help if you can diagnose the problem by reviewing the php or web server error logs.

See below, and I am using the current stable version of PHP 8 in cPanel, and it’s not PHP 8.1, but PHP 8.0.15

phpList ltd. - v3.6.7

PHP
Version 8.0.15

Database
Version 5.5.5-10.5.15-MariaDB

Actually, I traced this down to an issue with a mod-rewrite in my .htaccess file in my root directory:

Remove index.php from root URL

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.(php|html) [NC]
RewriteRule ^index.php$ https://www.mysite.com/ [R=301,L]

For some reason the behavior changed after switching to php 8. After removing this the links all work fine.

@keeenone Thanks. That looks to be specific to your installation rather than phplist directly.