ApacheCGI
extends FakeServerConf
in package
Simulate an Apache with CGI module or fastcgi module + PHP-FPM
Table of Contents
- $cgiAlias : mixed
- Alias to the binary, as defined in Apache with ScriptAlias
- $cgiBin : mixed
- $documentRoot : mixed
- full path to the document root
- $scriptName : mixed
- part of the path from the document root path to the physical php script
- __construct() : mixed
- setHttpRequest() : mixed
- setDefaultServer() : mixed
Properties
$cgiAlias
Alias to the binary, as defined in Apache with ScriptAlias
protected
mixed
$cgiAlias
= '/cgi-bin/php5'
$cgiBin
protected
mixed
$cgiBin
= '/usr/lib/cgi-bin/php5'
$documentRoot
full path to the document root
protected
mixed
$documentRoot
= '/var/www/'
$scriptName
part of the path from the document root path to the physical php script
protected
mixed
$scriptName
= '/index.php'
Methods
__construct()
public
__construct([string $documentRoot = null ][, mixed $scriptName = null ][, string $cgiBin = null ][, string $cgiAlias = null ]) : mixed
Parameters
- $documentRoot : string = null
-
the path of the document root of the site
- $scriptName : mixed = null
-
the PHP script name: path in the url from the domain name to the script itself
- $cgiBin : string = null
-
full system path of the CGI binary that launch PHP cgi
- $cgiAlias : string = null
-
the cgi alias as defined into apache
Return values
mixed —setHttpRequest()
public
setHttpRequest(mixed $url[, mixed $method = 'get' ][, mixed $body = '' ][, mixed $bodyContentType = 'application/x-www-form-urlencoded' ]) : mixed
Parameters
- $url : mixed
- $method : mixed = 'get'
-
the http method (get, post...)
- $body : mixed = ''
-
the content of the request for http method that need it it can be an array
- $bodyContentType : mixed = 'application/x-www-form-urlencoded'
Return values
mixed —setDefaultServer()
protected
setDefaultServer() : mixed