Keyword Analysis & Research: linux change default php version


Keyword Analysis


Keyword Research: People who searched linux change default php version also searched

Frequently Asked Questions

How do I change the PHP version on the command line?

To change the command line version of PHP you may use the following command. Again, changing this won’t affect the version used by the web server. $ sudo update-alternatives --config php. Enter the choice number mentioned besides the desired PHP version. or.

What is the default PHP version for Apache and CLI?

The PHP 5.6 is configured as default PHP version for Apache and CLI. Let’s make PHP 7.2 as default PHP for Apache server and CLI. Switch From PHP 5.6 => PHP 7.2. The PHP 5.6 is set as default version in your system, and you need to switch to PHP 7.2. Run the following commands to switch for Apache and command line.

How to disable a PHP version and enable another PHP version?

Install PHP . Once you have multiple PHP versions installed, we can use a2dismod and a2enmod scripts to disable a PHP version and enable another PHP version. Both these scripts can enable and disable any apache module. Assuming you have a PHP 8.1 currently set as the default PHP version, here is how to disable it –

Do I need to remove PHP 7.4 from my server?

Then you don’t need to remove PHP 7.4. You can simply switch your PHP version to default used for Apache and command line. For example, your server has PHP 7.4 and PHP 5.6 both version’s installed. Now following example will help you to switch between both versions. The PHP 5.6 is configured as default PHP version for Apache and CLI.


Search Results related to linux change default php version on Search Engine