Having successfully upgraded my test site (Debian Linux) to Zend Framework 3, I want to repeat the exercise on OS X El Capitan running Server 5.1.5. Originally this had PHP 5.5.x installed but I've upgraded to PHP 5.6.x and verified this with a phpinfo() display. However, when I try to run composer to install Zend Framework 3 modules, it responds that it can't be done as PHP 5.5.x is installed. Restarting etc. makes no difference. How does composer tell which PHP version is in use and how can I convince it that PHP 5.6.x is installed?
- Root composer. json requires php >=7.4 but your php version (7.3. 14) does not satisfy that requirement.
Check PHP Version by Running PHP Code The simplest method to determine the PHP version running on your website is executing a PHP file that contains the following code: <? php echo 'PHP version: ' . phpversion();
To update your packagesNavigate to the root of your git repo, where your composer. json file is. Run composer update (on your local machine) to update the required packages and re-generate a composer. lock file.
When i understand correctly, then your server is already PHP 5.6 and should be able to run ZF3, but the CLI is PHP 5.5 and Composer stops fetching the ZF3 modules, because the PHP is too low, right?
You have one PHP for the CLI and another PHP for the server. When you run composer
it will check the PHP version of the currently running PHP used from the CLI.
Two solutions come to my mind:
--ignore-platform-reqs
to your composer command.
This will ignore the env checks and pretend everything is ok.
Keep in mind that this will also disable checks for extensions, which might be needed by some of the modules. If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With