John Davidson

How can I change the PHP version used by phpmyadmin?

0 comments
Message:


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 !



My Answer:
To change the PHP version used by phpMyAdmin, you need to update the configuration file for the web server that is serving phpMyAdmin. Here's how you can do it:

1. Locate the configuration file for phpMyAdmin. This could be in the Apache configuration directory or in a separate configuration file specifically for phpMyAdmin. The file is usually named something like phpmyadmin.conf or phpmyadmin.conf.

2. Open the configuration file in a text editor.

3. Look for the line that specifies the PHP version to use. It may look something like this:


SetHandler application/x-httpd-php72


4. Change the PHP version in that line to the version you want to use. For example, if you want to use PHP 7.4, change it to:


SetHandler application/x-httpd-php74


5. Save the configuration file and restart the web server for the changes to take effect. You can restart Apache using the following command:


sudo systemctl restart apache2


After making these changes, phpMyAdmin should now be using the PHP version you specified in the configuration file.

Rate this post

3 of 5 based on 7362 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us