Setting PHP version, extensions, ini_config for an OC application


#1
curl -X POST
     -H "Authorization: Bearer <thy_api_key>" \
     -d '<request_body_json>'
https://www.opscaptain.com/api/instances/app/phpsettings?appid=<thy_appid>

Request body JSON format

{
     "version": "optional STRING", 
     "web_server": "optional STRING", 
     "extensions": ["optional STRING ARRAY"], 
     "ini_config": ["optional STRING ARRAY"]
}

Request body parameters explained
If at any point you want to unset all parameters to the default, simply send the request with an empty JSON. ie: {}

version: The version of PHP that will be used to run the referenced application. Possible values include: {PHP_56_LATEST}, {PHP_70_LATEST}, {PHP_71_LATEST} and {PHP_72_LATEST}

web_server: The web server to be used to run the referenced application. Possible values include: httpd and nginx. Unless you know what you are doing, always run your app with httpd.

extensions: An array containing extensions to enable for this application. For a list of supported extensions, please reference this document:

ini_config: If you need to set directives for the referenced application, you can provide each directive as a string in the given array. See example below:

{
     "version": "{PHP_72_LATEST}", 
     "ini_config": [
              "output_buffering = on", 
              "upload_max_filesize = 20M", 
              "post_max_size = 21M"
     ]
}