Why isn't PHP-FPM working?

General Tech Bugs & Fixes 3 years ago

2.91K 1 0 0 0

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago

 

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:


    ServerName proj2.local
    DocumentRoot /var/www/proj2

    
        # This is to forward all PHP to php-fpm.
        
            SetHandler "proxy:fcgi://127.0.0.1:9500"
            SetHandler application/x-httpd-php
        

        Options Indexes FollowSymLinks
        AllowOverride All
    

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?

0 views
0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum