-
-
Save fritids/bd3bc22fedabeb2d8a17 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Debug phpBB installation path detections | |
*/ | |
define('IN_PHPBB', true); | |
$phpEx = substr(strrchr(__FILE__, '.'), 1); | |
$phpbb_root_path = (strpos(__FILE__, 'adm/') !== false) ? './../' : './'; | |
include($phpbb_root_path . 'common.' . $phpEx); | |
$user->session_begin(); | |
header('Content-type: text/plain'); | |
foreach (array('PHP_SELF', 'QUERY_STRING', 'REQUEST_URI') as $var) | |
{ | |
echo "$var: "; | |
if (isset($_SERVER[$var])) | |
{ | |
var_dump($_SERVER[$var]); | |
} | |
else if (getenv($var)) | |
{ | |
var_dump(getenv($var)); | |
} | |
else | |
{ | |
echo "unset"; | |
} | |
echo "\n"; | |
} | |
echo 'realpath(): ', realpath('./'), "\n"; | |
echo 'phpbb_realpath(): ', phpbb_realpath('./'), "\n"; | |
echo 'generate_board_url(): ', generate_board_url(), "\n"; | |
var_dump(session::extract_current_page($phpbb_root_path)); | |
garbage_collection(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment