skip to Main Content

I have phpmyadmin installed on my ubuntu server, that runs several versions of PHP depending on the website used.
The default version is 7.4, but phpmyadmin use 7.2 for unknown reason.
Simple question : where do I change that ?
Cannot find it in any forum or documentation…

I tried to put in phpmyadmin/apache.conf what I use in my virtual hosts sites :

<FilesMatch .php$>
    SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost/"
</FilesMatch>

but it doesn’t work and I still have 7.2

Thanks a lot !

3

Answers


  1. Chosen as BEST ANSWER

    Solution found ! As my Phpmyadmin installation doesn't use the virtual host file system, the file to modify is /etc/phpmyadmin/apache.conf

    I put a code, but outside the Directory tags, and you have to put it inside to make it work :

    <Directory /usr/share/phpmyadmin>
        <FilesMatch .php$>
        SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost/"
        </FilesMatch>
    </Directory>
    

    And then, restart Apache change the PHP version of phpmyadmin page.

    Thanks !


  2. Here’s how I do it:

    Go to phpMyAdmin config

    cd /etc/apache2/sites-available
    

    Open config file

    sudo nano phpmyadmin.conf
    

    Put the following line inside the tags to serve 7.4:

    include /etc/apache2/conf-available/php7.4-fpm.conf
    

    Restart apache:

    sudo systemctl restart apache2
    

    Note that my setup is mostly from this tutorial.

    Login or Signup to reply.
  3. Add the below code inside /etc/phpmyadmin/apache.conf

    <Directory /usr/share/phpmyadmin>
        <FilesMatch .php$>
        SetHandler "proxy:unix:/var/run/php/php8.1-fpm.sock|fcgi://localhost/"
        </FilesMatch>
    </Directory>
    

    After that restart Apache

    sudo systemctl restart apache2
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search