serj
serj

Reputation: 189

simultaneously use of php5 and php7 on Fedora 27

I am trying to configure everything in order to run simultaneously php5 and php7 on Fedora 27. I am using Remi's guides from here and here, I am able to switch versions in the command line with module load/unload php71/php56 but on the page where I output phpinfo(); I get php version of 7.1. I have also running php56-php-fpm.service and php71-php-fpm.service running. What should I check or where to search? Thank you.

php.conf file:

# Redirect to local php-fpm if mod_php (5 or 7) is not available
<IfModule !mod_php5.c>
  <IfModule !mod_php7.c>
    # Enable http authorization headers
    SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1

    <FilesMatch \.php$>
        SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
    </FilesMatch>
  </IfModule>
</IfModule>

also there are php56-php.conf and php71-php.conf files. As I understand mod_php is serving files instead of php-fpm, is there any method to disable it?

Upvotes: 0

Views: 450

Answers (1)

Remi Collet
Remi Collet

Reputation: 7041

Check all SetHandler Directives in /etc/httpd/conf.d/*conf

Each package comes with its configuration file (php##-php.conf), you may have to disable them to be able to set the proper version per vhost / project / directory, or ensure your configuration files are loaded after provided ones.

Upvotes: 0

Related Questions