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:
Extracts an application to the environment directory (note that the directory must be used exclusively by the environment).
Sets up a virtual site (or directory) on the web server that will serve the environment. URL mapping must match the Type Definition interface definition for the application.
Ensures backend security on the virtual site.
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 |
|
fileUploads |
|
safeMode |
|
shortOpenTag |
|
registerGlobals |
|
magicQuotesGpc |
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.