Search

Mar 28, 2023

Magento2 Cloud: PHP Parse error Command post_deploy.sh returned non-zero exit status 139

Push code to cloud and got the below error

```   
Uploading applications to the remote cluster
      Uploaded application mymagento to the remote cluster
    W: Route '***.cloud' doesn't map to a domain of the project, using default development hostname.
    Deploying applications
      Starting deployment
      Preparing slugs
      Entering maintenance mode
      Running deploy hook
      W: PHP Parse error:  syntax error, unexpected '?' in /app/***/vendor/magento/ece-tools/autoload.php on line 6
      W: Segmentation fault
      E: Failed to run deploy hook
      E: Command '['sudo', '-u', '', 'bash', '-c', '/etc/platform/***/post_deploy.sh']' returned non-zero exit status 139
      Exiting maintenance mode
    E: Error: Cannot complete deployment
Processing activity: Sending webhook
To git.us-3.magento.cloud:***.git
Done
```

SOLUTION:

You've got PHP 8.1 defined in your .magento.app.yaml file, and unfortunately, your cloud cluster doesn't have the version of PHP available and needs to be upgraded to Debian 9 (stretch). 
Contact to magneto2 cloud support and upgraded OS to Debian 9 or more

No comments:

Post a Comment