The PHP environment APS type is designed to run applications written in the PHP programming language.
This environment performs a scenario typical for a web application:
In this document:
The PHP environment is an environment with an installed PHP interpreter, based on the Base Environment. Applications that are compatible with this environment declare an URL Mapping element within their APP-META.xml.
The PHP Environment type schema (download
):
{
"apsVersion": "2.0",
"name": "PhpEnvironment",
"id": "http://aps-standard.org/types/infrastructure/environment/php/1.0",
"implements": [ "http://aps-standard.org/types/infrastructure/environment/1.0" ],
"properties": {
"php": {
"type": "Php"
}
},
"structures": {
"Php": {
"type": "object",
"properties": {
"version": { "type": "string", "required": false },
"extensions": { "type": "array", "items": { "type": "string" } },
"allowUrlFopen": { "type": "boolean" },
"fileUploads": { "type": "boolean" },
"safeMode": { "type": "boolean" },
"shortOpenTag": { "type": "boolean" },
"registerGlobals": { "type": "boolean" },
"magicQuotesGpc": { "type": "boolean" },
"memoryLimit": { "type": "integer" },
"maxExecutionTime": { "type": "integer" },
"postMaxSize": { "type": "integer" }
}
}
}
}
When a PHP interpreter is available in the environment, a list of engines of the environment should have a ‘php’ element.
The resource property version defines the full version of a php interpreter.
"php": {
"version": "5.4.1"
}
The resource array property extension defines all available php extensions.
"php": {
...
"extentions": [ "curl", "Zend Optimizer", "ionCube Loader" ]
...
}
"php": {
...
"allowUrlFopen": true
...
}
They define states of the following php interpreter options:
Setting name | Corresponding PHP option |
---|---|
allowUrlFopen | allow_url_fopen |
fileUploads | file_uploads |
safeMode | safe_mode |
shortOpenTag | short_open_tag |
registerGlobals | register_globals |
magicQuotesGpc | magic_quotes_gpc |
Please refer to the PHP documentation for the details on each parameter.
"php": {
...
"memoryLimit": 16777216
...
}
PHP Limits are declared in the following fields of the configuration structure:
Setting name | Corresponding PHP option |
---|---|
memoryLimit | memory_limit in bytes. |
maxExecutionTime | max_execution_time in seconds. |
postMaxSize | post_max_size in bytes. |
Please refer to the PHP documentation for the details on each parameter.