". var_export($var,true) ."\n";
}
/* function main() ---------------------------------------------------------- */
$is_s_u=isset($_SERVER['SCRIPT_URI']); # if not, will get set by photinc.php
require_once('../../httpdocs/incl/rwhead5.php');
require_once('../../httpdocs/incl/photinc.php');
if (isset($_POST['subind'])) {
foreach($_POST as $name => $value) {
$rqs .= "&$name=". urlencode($value);
}
header("Location: {$_SERVER['SCRIPT_URI']}");
header("POST {$_SERVER['SCRIPT_NAME']} HTTP/1.1");
header("Host: http://{$_SERVER['SERVER_NAME']}");
header("Content-type: application/x-www-form-urlencoded");
header(substr($rqs,1));
exit;
}
rwhhead($titext,"","index,follow","");
?>
">Retest with "killer" params
Raw display of $_GET:
$val ) {
if (get_magic_quotes_gpc()) $sqv=stripslashes($val);
echo ''. htmlspecialchars($ky) .
' | => '. htmlspecialchars($val) .
' | '. htmlspecialchars($sqv) .
" |
\n";
}
echo "
\n";
if (strlen($ky)>0) { $_GET[$ky]= 'new value of $_GET["'. $ky .'"]'; }
add_to_get_in_function();
if (isset($_SERVER['REDIRECT_URL']))
echo "Called via a redirect - data may be missing from \$_POST
\n";
echo "\$_REQUEST (\$_GET, \$_POST and possibly \$_COOKIE): ". varxs($_REQUEST) .
"\$_GET: ". varxs($_GET);
if (strlen($ky)>0) {
echo "\$_GET has been changed but the same field in \$_REQUEST is unchanged.
";
}
$stat_file=stat(__FILE__); # compiler on my Windows XP machine did not like stat(__FILE__)['uid']
echo '$_POST: '. varxs($_POST) . # must use ' cos raw variabe names
'$_COOKIE: '. varxs($_COOKIE) .
'$_SERVER: '. varxs($_SERVER) .
($is_s_u ? "" : "SCRIPT_URI has been set by photinc.php.
\n") .
"SCRIPT_DIR and HTTP_WINVER are non-standard and have been added by photinc.php
\n".
'getcwd(): '.
(substr($_SERVER['SCRIPT_FILENAME'],0,strlen(getcwd()))==getcwd() ? "matches" :
(strcasecmp(substr($_SERVER['SCRIPT_FILENAME'],0,strlen(getcwd())),getcwd()) ?
"does not match" : "case-insensitive match on")) .
' $_SERVER[\'SCRIPT_FILENAME\']'. varxs(getcwd()) .
'$_SESSION: '. varxs($_SESSION) .
'$_ENV: '. varxs($_ENV) .
'$_FILES: '. varxs($_FILES) .
"\$argc: $argc
\n".
"\$argv:". varxs($argv).
"apache_request_headers(): ".(!function_exists(apache_request_headers)
? "does not exist
\n" : varxs(apache_request_headers()) ).
"getdate(): ". print_r(getdate(),TRUE) ."
\n".
# note differences between var_export() and print_r() !
"http_response_code(): ".(!function_exists('http_response_code') ? "does not exist" :
" ". http_response_code() ." ").
"
\n".
"pathinfo(__FILE__): ". varxs(pathinfo(__FILE__)).
# pathinfo() takes an optional parameter to return one individual component
"posix_getpwuid(): ".(!function_exists(posix_getpwuid) ? "does not exist
\n" :
"for ". __FILE__ . varxs(posix_getpwuid($stat_file['uid'])) ).
"stat(__FILE__):". varxs($stat_file).
""; # separated out so individual tests can be shifted
echo "\nWindow data:\n";
?>
\n$http_header
\n";
} else {
echo "using get_headers():" .varxs(get_headers($_SERVER['SCRIPT_URI']));
}
} else {
echo "add gh=1 to command line to use get_headers()".
" or gh=2 to use http_get(). Warning may be very slow!
\n";
}
$php_ini_file_name="/var/www/vhosts/system/{$_SERVER['HTTP_HOST']}/etc/php.ini";
echo "php.ini:".
(file_exists($php_ini_file_name)
? "". file_get_contents($php_ini_file_name) ."
\n"
: " $php_ini_file_name does not exist
\n" );
echo "phpversion(): ". phpversion() ." \n
\n";
if (!$_REQUEST[em2px]) $_REQUEST[em2px]=16;
$bx2w=50*$_REQUEST[em2px];
echo "".
"This box is specified as 50 em wide
\n".
"".
"\$_REQUEST[em2px]={$_REQUEST[em2px]}. So this box is specified as ".
"50*{$_REQUEST[em2px]}=$bx2w pixels wide
\n";
$domains=array('croydonquakers.org.uk', 'epsomquakers.org.uk', 'purleyquakers.org.uk',
'slaqm.org.uk', 'southlondonquakers.org.uk',
'mikrocosm.com', 'robust-ae.com', 'posp.org.uk', 'rhaworth.net',
'theplayersofstpeter.org.uk', 'shakespearereadingsociety.co.uk');
echo "
\n".
"All sites: | \n".
"".
"localhost |\n".
"RHaworth.com ".
"(interceptor)\n";
foreach($domains as $domna) {
echo "| ". ($_SERVER['HTTP_HOST']==$domna ? "$domna\n" :
"$domna\n");
}
$stats=stat($_SERVER['SCRIPT_FILENAME']);
echo " |
\n
\n".
"".date("Y M d H:i:s",$stats['mtime']) .
" - {$_SERVER['SCRIPT_FILENAME']} = \$_SERVER['SCRIPT_FILENAME']
\n".
"". date("Y M d H:i:s",$stat_file['mtime']) .
" - ". __FILE__ ." = __FILE__
\n".
html5_validator_link() ."
\n\n