Contents
How do I get the current version of PHP?
1. Type the following command, replacing [location] with the path to your PHP installation. 2. Typing php -v now shows the PHP version installed on your Windows system.
How do I disable old versions of PHP?
disable old version of php-fpm after upgrade from 7.0 to 7.1
- service php-fpm7.0 stop or systemctl stop php-fpm7.0 – Ekin Apr 20 ’17 at 12:54.
- Failed to stop php-fpm7.0.service: Unit php-fpm7.0.service not loaded. –
- Both command return Failed to stop php-fpm7.0.service: Unit php-fpm7.0.service not loaded. –
What’s the version of PHP available from the command line?
The version of PHP available from the command line has 100% nothing to do with the version of PHP loaded as a module. These are completely separate things. So if you are concerned about which version of PHP your web application is using, if phpinfo () shows version 5.6.10 and that is what you want/need that is 100% fine.
Why do I get different versions of PHP?
Your server apparently has multiple versions of PHP installed, and when you login and run php on the command line, you are getting the older version which is installed to /usr/bin/php. A server can have many versions of PHP, and yours seems to. If you need to manually execute the same PHP as your web server then you need to find the other version.
How to change the Apache version of PHP?
When you update php on your web server and want to make sure the CLI php version used is the most current when you sudo as the apache user, don’t forget to change it in the .bashrc file of this user, like this: Just an update, I was able to solve this issue by disable all other php apache modules via a2dismod php7.* I hope this helps someone!
Is the PHP command line binary the same as Apache?
The Apache PHP module and the PHP command line binary are two different things that don’t interfere with each other. In fact you can compile and load various PHP versions you want to work with Apache as long as you adjust Apache to properly load it. The PHP command line interface will never come into play in the case of Apache parsing PHP pages.