Your ROOT_URL in app.ini is https://git.ondrovo.com/ but you are visiting http://159.69.29.240:49153/MightyPork/php-sandbox/commit/b16059ce0ebbf2071051e90665442b40b6c73236?style=unified&whitespace=ignore-eol
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
19 additions and
1 deletions
config.php.dist
index.php
@ -7,4 +7,9 @@ return array(
// whitelist of IPs which don't need to be authenticated
// use '*' to allow any IP
'ip_whitelist' => array('127.0.0.1', '::1'),
// bootstrap file, if defined this file will be included before
// the code entered by the user is evaluated. any variables and classes
// defined here will be accessible by the eval'd code
'bootstrap' => null,
);
@ -7,6 +7,11 @@ $defaults = array(
// whitelist of IPs which don't need to be authenticated
// use '*' to allow any IP
'ip_whitelist' => array('127.0.0.1', '::1'),
// bootstrap file, if defined this file will be included before
// the code entered by the user is evaluated. any variables and classes
// defined here will be accessible by the eval'd code
'bootstrap' => null,
);
if (file_exists(__DIR__.'/config.php')) {
@ -45,6 +50,14 @@ error_reporting(E_ALL | E_STRICT);
$debugOutput = '';
function runCode($__source_code, $__bootstrap_file)
{
if ($__bootstrap_file) {
require $__bootstrap_file;
}
eval($__source_code);
}
if (isset($_POST['code'])) {
if (get_magic_quotes_gpc()) {
$code = stripslashes($code);
@ -73,7 +86,7 @@ if (isset($_POST['code'])) {
$memBefore = memory_get_usage(true);
$start = microtime(true);
eval ($code);
runCod e($code, $options['bootstrap'] );
// compare with peak, because regular memory could be free'd already
$end = microtime(true);