Reputation: 460
I'm trying to install Laravel on Google Cloud Platform, but the PHP version is 5.6.30.
How can I update it to the version PHP 7.2?
Upvotes: 0
Views: 1462
Reputation: 2357
Depending on the Standard or Flexible Runtime, different PHP versions are supported.
For the Standard Environment:
App Engine runs your PHP web application using a PHP version 5.5.34 interpreter. Note: On Linux you must also install PHP locally to run your PHP apps.
To use PHP 7.2 in the Flexible Enrironment:
By default, the PHP runtime uses PHP 7.2, but you should explicitly declare your PHP version in the composer.json file to prevent your application from being automatically upgraded when a new version of PHP becomes available. The PHP versions 5.6., 7.0., and 7.1.* are also supported.
So you include this in the composer.json:
{
"require": {
"php": "7.2.*"
}
}
So if you're using Flexible Enrironment, set the PHP version following the above indications.
There is a Community Tutorial on how to run Laravel on Google App Engine Flexible Environment.
Upvotes: 1