Hi friends.,
Today I have faced some problem in PHP version, in my terminal. I just hit a command in terminal (php -v) to know the PHP version, it showing PHP 7.0. Then I have checked in the browser by using phpinfo(), it has shown as PHP 5.6. Then I have some other problem related to this, then I can't able to install related plugins in PHP 5.6.
Finally, i got some solution to change the PHP version in terminal
Today I have faced some problem in PHP version, in my terminal. I just hit a command in terminal (php -v) to know the PHP version, it showing PHP 7.0. Then I have checked in the browser by using phpinfo(), it has shown as PHP 5.6. Then I have some other problem related to this, then I can't able to install related plugins in PHP 5.6.
Finally, i got some solution to change the PHP version in terminal
- sudo ln -sfn /usr/bin/php7.0 /etc/alternatives/php -> (PHP 5.6 to PHP 7.0)
- sudo ln -sfn /usr/bin/php5.6 /etc/alternatives/php -> (PHP 7.0 to PHP 5.6)
Change PHP version:
- First disable your current PHP version
- Enable, which PHP version you want to change
- Restart the apache
Step for PHP 5.6 to PHP 7.0:
- sudo a2dismod php5.6
- sudo a2enmod php7.0
- sudo service apache2 restart
Step for PHP 7.0 to PHP 5.6:
- sudo a2dismod php7.0
- sudo a2enmod php5.6
- sudo service apache2 restart
Comments
Post a Comment