简体   繁体   English

在Fedora 27上同时使用php5和php7

[英]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(); 我正在尝试配置所有内容,以便在Fedora 27上同时运行php5和php7。我在这里这里使用Remi的指南,我可以在命令行中使用module load/unload php71/php56切换版本,但是在页面上我在哪里输出phpinfo(); I get php version of 7.1. 我得到7.1的php版本。 I have also running php56-php-fpm.service and php71-php-fpm.service running. 我也正在运行php56-php-fpm.service和php71-php-fpm.service。 What should I check or where to search? 我应该检查什么或在哪里搜索? Thank you. 谢谢。

php.conf file: php.conf文件:

# 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. 也有php56-php.conf和php71-php.conf文件。 As I understand mod_php is serving files instead of php-fpm, is there any method to disable it? 据我了解,mod_php是在提供文件而不是php-fpm,是否有任何方法可以禁用它?

Check all SetHandler Directives in /etc/httpd/conf.d/*conf 检查/etc/httpd/conf.d/*conf所有SetHandler指令

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. 每个软件包都带有其配置文件(php ##-php.conf),您可能必须禁用它们才能为每个vhost / project /目录设置正确的版本,或者确保提供配置文件加载配置文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM