diff options
author | Stanley Sufficool <ssufficool@php.net> | 2014-10-20 21:33:32 -0700 |
---|---|---|
committer | Stanley Sufficool <ssufficool@php.net> | 2014-10-20 21:33:32 -0700 |
commit | 8defcb855ab01d9c8ab4759cb793d80149b55a8c (patch) | |
tree | ed51eb30a2cbc92b102557498fb3e4113da1bb07 /sapi/phpdbg/web-bootstrap.php | |
parent | 9c7dbb0487f5991fde03873ea8f5e66d6688415f (diff) | |
parent | baddb1c73a170ef1d2c31bd54cddbc6e1ab596b9 (diff) | |
download | php-git-8defcb855ab01d9c8ab4759cb793d80149b55a8c.tar.gz |
Merge branch 'master' of https://git.php.net/push/php-src
* 'master' of https://git.php.net/push/php-src: (6215 commits)
Extra comma
Moved proxy object support in ASSIGN_ADD (and family) from VM to slow paths of corresponding operators
Simplification
zend_get_property_info_quick() cleanup and optimization
initialize lineno before calling compile file file in phar
Use ADDREF instead of DUP, it must be enough.
Removed old irrelevant comment
fixed compilation error
Fix bug #68262: Broken reference across cloned objects
export functions needed for phpdbg
Fixed compilation
Optimized property access handlers. Removed EG(std_property_info).
Fixed bug #68199 (PDO::pgsqlGetNotify doesn't support NOTIFY payloads)
Don't make difference between undefined and unaccessible properies when call __get() and family
Don't make useless CSE
array_pop/array_shift optimization
check for zlib headers as well as lib for mysqlnd
a realpath cache key can be int or float, catching this
News entry for new curl constants
News entry for new curl constants
...
Diffstat (limited to 'sapi/phpdbg/web-bootstrap.php')
-rw-r--r-- | sapi/phpdbg/web-bootstrap.php | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/sapi/phpdbg/web-bootstrap.php b/sapi/phpdbg/web-bootstrap.php new file mode 100644 index 0000000000..7b8c5d30de --- /dev/null +++ b/sapi/phpdbg/web-bootstrap.php @@ -0,0 +1,64 @@ +<?php +/** + * The following file shows how to bootstrap phpdbg so that you can mock specific server environments + * + * eval include("web-bootstrap.php") + * exec index.php + * compile + * break ... + * run + */ +if (!defined('PHPDBG_BOOTSTRAPPED')) +{ + /* define these once */ + define("PHPDBG_BOOTPATH", "/opt/php-zts/htdocs"); + define("PHPDBG_BOOTSTRAP", "index.php"); + define("PHPDBG_BOOTSTRAPPED", sprintf("/%s", PHPDBG_BOOTSTRAP)); +} + +/* + * Superglobals are JIT, phpdbg will not over-write whatever you set during bootstrap + */ + +$_SERVER = array +( + 'HTTP_HOST' => 'localhost', + 'HTTP_CONNECTION' => 'keep-alive', + 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', + 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36', + 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate,sdch', + 'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.8', + 'HTTP_COOKIE' => 'tz=Europe%2FLondon; __utma=1.347100075.1384196523.1384196523.1384196523.1; __utmc=1; __utmz=1.1384196523.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)', + 'PATH' => '/usr/local/bin:/usr/bin:/bin', + 'SERVER_SIGNATURE' => '<address>Apache/2.4.6 (Ubuntu) Server at phpdbg.com Port 80</address>', + 'SERVER_SOFTWARE' => 'Apache/2.4.6 (Ubuntu)', + 'SERVER_NAME' => 'localhost', + 'SERVER_ADDR' => '127.0.0.1', + 'SERVER_PORT' => '80', + 'REMOTE_ADDR' => '127.0.0.1', + 'DOCUMENT_ROOT' => PHPDBG_BOOTPATH, + 'REQUEST_SCHEME' => 'http', + 'CONTEXT_PREFIX' => '', + 'CONTEXT_DOCUMENT_ROOT' => PHPDBG_BOOTPATH, + 'SERVER_ADMIN' => '[no address given]', + 'SCRIPT_FILENAME' => sprintf( + '%s/%s', PHPDBG_BOOTPATH, PHPDBG_BOOTSTRAP + ), + 'REMOTE_PORT' => '47931', + 'GATEWAY_INTERFACE' => 'CGI/1.1', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + 'REQUEST_METHOD' => 'GET', + 'QUERY_STRING' => '', + 'REQUEST_URI' => PHPDBG_BOOTSTRAPPED, + 'SCRIPT_NAME' => PHPDBG_BOOTSTRAPPED, + 'PHP_SELF' => PHPDBG_BOOTSTRAPPED, + 'REQUEST_TIME' => time(), +); + +$_GET = array(); +$_REQUEST = array(); +$_POST = array(); +$_COOKIE = array(); +$_FILES = array(); + +chdir(PHPDBG_BOOTPATH); |