back to phpList.org

[SOLVED] Getting 403 Forbidden when Trying to Use PHP 7.1


#1

I’ve been using PHPList for several years. I’m running on a shared hosting server. PHP version was 5.6, but I would like to update to 7.1. I upgraded PHPList to version 3.3.3.
I had this behavior with the earlier version too. When I try to go to /phplist, or /phplist/admin, I get “Forbidden 403. You don’t have permission to access /phplist/ on this server.”
I can go back to PHP version 5.6, and it works again.
Does anyone know where I should look next?

Thanks


#2

@pauldow If you think this is due to phpList being incompatible with your version of PHP then try the latest release candidate (RC) on Sourceforge, or wait until the next final release (probably next week). They include a PHP compatibility fix which may (or may not) help.


#3

Hi Sam,
Thank you for the reply.
I think I have a problem with my web site configuration. I see that I also get the 403 error when I try to visit a Magento (shopping) page I have. The Magento version I’m trying to use does require PHP 7, so I’d like to migrate to that from PHP version 5.6. The speed improvements are a good incentive for changing too.
I wonder if it has something to do with using Let’s Encrypt, and redirecting everything to https ?
I’ll try disabling that.

Paul


#4

@pauldow We also use let’s encrypt on phpList.com, without issue. I can’t shed any light on your issue, but hope you manage to resolve it soon!


#5

I found a fix for this problem.
When I select PHP 7.1 through cPanel, it adds this code to my htaccess file

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “alt-php71” package as the default “PHP” programming language.
<IfModule mime_module>
  AddType application/x-httpd-alt-php71 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

I saw some other messages that say to use this line

AddHandler application/x-httpd-alt-php71 .php .php5 .php4 .php3 .php7 .phtml

I used that, and commented out the auto generated section, and it works.


#6

Great to hear that you found a solution. Thanks very much for sharing it with the community.