0

I have a Linux Mint 19 setup that's running Apache2 and two version of PHP-FPM:

  • 7.1
  • 7.2

I got my 7.1 site up and running but now I'm trying to get my other site to run on php7.2 but it's not working and I'm not sure how to resolve. It's loading PHP7.1 despite the configuration I've added.

Site .htaccess file looks like this:

AddHandler php72-fcgi .php

And my vhost:

<VirtualHost *:80>
    ServerName proj2.local
    DocumentRoot /var/www/proj2

    <Directory /var/www/proj2>
        # This is to forward all PHP to php-fpm.
        <FilesMatch \.php$>
            SetHandler "proxy:fcgi://127.0.0.1:9500"
            SetHandler application/x-httpd-php
        </FilesMatch>

        Options Indexes FollowSymLinks
        AllowOverride All
    </Directory>
</VirtualHost>

And my www.conf has only one change in it (from default):

listen = 127.0.0.1:9500

I ran after the changes:

$ sudo service apache2 restart
$ sudo service php7.2-fpm restart

I created a info.php in proj2 directory and it displays information for PHP7.1. Why is it pointing to PHP7.1 and not PHP7.2?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.