I'm trying to debug a web application based on the CodeIgniter (2.x) framework. I've tried var_dumping $_SERVER and recreating this at the beginning of my debugging session (bootstrapping phpdbg).
$ phpdbg -e index.php
phpdbg> ev require('boostrap.php');
phpdbg> run
However it gives me a 404. even though requesting the page through the browser gives me the correct result. could somebody tell me how to properly bootstrap phpdbg so it loads the correct page in codeigniter? this is my bootstrapping code, if it helps.
<?php
$_SERVER = array (
'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv: 38.0) Gecko/20100101 Firefox/38.0',
'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.5',
'HTTP_ACCEPT_ENCODING' => 'identity,gzip,deflate',
'HTTP_CONNECTION' => 'keep-alive',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'SERVER_SIGNATURE' => '<address>Apache/2.4.12 (Ubuntu) Server at api.timzwart.local.mybit.nl Port 80</address>',
'SERVER_SOFTWARE' => 'Apache/2.4.12 (Ubuntu)',
'SERVER_NAME' => 'api.timzwart.local.mybit.nl',
'SERVER_ADDR' => '192.168.1.35',
'SERVER_PORT' => '80',
'REMOTE_ADDR' => '192.168.1.35',
'DOCUMENT_ROOT' => '/var/www/vhosts/api.timzwart.local.mybit.nl',
'REQUEST_SCHEME' => 'http',
'CONTEXT_PREFIX' => '',
'CONTEXT_DOCUMENT_ROOT' => '/var/www/vhosts/api.timzwart.local.mybit.nl',
'SERVER_ADMIN' => 'webmaster@localhost',
'SCRIPT_FILENAME' => '/var/www/vhosts/api.timzwart.local.mybit.nl/index.php',
'REMOTE_PORT' => '40706',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'SERVER_PROTOCOL' => 'HTTP/1.0',
'REQUEST_METHOD' => 'GET',
'QUERY_STRING' => '',
'REQUEST_URI' => '/events/185151',
'SCRIPT_NAME' => '/index.php',
'PATH_INFO' => '/events/185151',
'PATH_TRANSLATED' => 'redirect:/index.php/events/185151/185151',
'PHP_SELF' => '/index.php/events/185151',
'REQUEST_TIME_FLOAT' => 1435128205.281,
'REQUEST_TIME' => 1435128205,
'REDIRECT_URL' => '/events/185151',
'REQUEST_URI' => '/events/185151',
'argv' => array('events','185151'),
);
?>