bug 898484 IIS crash
This commit is contained in:
@@ -9,6 +9,8 @@ $Source$
|
|||||||
* libraries/relation.lib.php: bug 930445 when PMA_table_info not defined,
|
* libraries/relation.lib.php: bug 930445 when PMA_table_info not defined,
|
||||||
thanks to Philippe Jausions (jausions)
|
thanks to Philippe Jausions (jausions)
|
||||||
* Documentation.html: new faq links and cleanup, thanks to C<>dric Corazza
|
* Documentation.html: new faq links and cleanup, thanks to C<>dric Corazza
|
||||||
|
* tbl_replace.php, libraries/defines.lib.php, /common.lib.php:
|
||||||
|
bug 898484, IIS crash: do not use header('Location: ')
|
||||||
|
|
||||||
2004-04-12 Marcel Tschopp <marcel.tschopp@gmx.net>
|
2004-04-12 Marcel Tschopp <marcel.tschopp@gmx.net>
|
||||||
* left.php, tbl_properties_structure.php, libraries/mysql_charsets.lib.php,
|
* left.php, tbl_properties_structure.php, libraries/mysql_charsets.lib.php,
|
||||||
|
@@ -1085,6 +1085,35 @@ if ($is_minimum_common == FALSE) {
|
|||||||
echo $strHostEmpty;
|
echo $strHostEmpty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send HTTP header, taking IIS limits into account
|
||||||
|
* ( 600 seems ok)
|
||||||
|
*
|
||||||
|
* @param string the header to send
|
||||||
|
*
|
||||||
|
* @return boolean always true
|
||||||
|
*/
|
||||||
|
function PMA_sendHeaderLocation($uri)
|
||||||
|
{
|
||||||
|
if (PMA_IS_IIS && strlen($uri) > 600) {
|
||||||
|
|
||||||
|
echo '<html><head><title>- - -</title>' . "\n";
|
||||||
|
echo '<meta http-equiv="expires" content="0">' . "\n";
|
||||||
|
echo '<meta http-equiv="Pragma" content="no-cache">' . "\n";
|
||||||
|
echo '<meta http-equiv="Cache-Control" content="no-cache">' . "\n";
|
||||||
|
echo '<meta http-equiv="Refresh" content="0;url=' .$uri . '">' . "\n";
|
||||||
|
echo '<script language="JavaScript">' . "\n";
|
||||||
|
echo 'setTimeout ("window.location = unescape(\'"' . $uri . '"\')",2000); </script>' . "\n";
|
||||||
|
echo '</head>' . "\n";
|
||||||
|
echo '<body> <script language="JavaScript">' . "\n";
|
||||||
|
echo 'document.write (\'<p><a href="' . $uri . '">' . $GLOBALS['strGo'] . '</a></p>\');' . "\n";
|
||||||
|
echo '</script></body></html>' . "\n";
|
||||||
|
|
||||||
|
} else {
|
||||||
|
header('Location: ' . $uri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the list and number of available databases.
|
* Get the list and number of available databases.
|
||||||
|
@@ -9,7 +9,8 @@
|
|||||||
* PMA_PHP_INT_VERSION (int) - eg: 30017 instead of 3.0.17 or
|
* PMA_PHP_INT_VERSION (int) - eg: 30017 instead of 3.0.17 or
|
||||||
* 40006 instead of 4.0.6RC3
|
* 40006 instead of 4.0.6RC3
|
||||||
* PMA_IS_WINDOWS (bool) - mark if phpMyAdmin running on windows
|
* PMA_IS_WINDOWS (bool) - mark if phpMyAdmin running on windows
|
||||||
* server
|
* PMA_IS_IIS (bool) - true is phpMyAdmin is running
|
||||||
|
* on Microsoft IIS server
|
||||||
* PMA_IS_GD2 (bool) - true if GD2 is present
|
* PMA_IS_GD2 (bool) - true if GD2 is present
|
||||||
* PMA_USR_OS (string) - the plateform (os) of the user
|
* PMA_USR_OS (string) - the plateform (os) of the user
|
||||||
* PMA_USR_BROWSER_AGENT (string) - the browser of the user
|
* PMA_USR_BROWSER_AGENT (string) - the browser of the user
|
||||||
@@ -49,6 +50,16 @@ if (!defined('PMA_IS_WINDOWS')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Whether the Web server php is running on is IIS
|
||||||
|
if (!defined('PMA_IS_IIS')) {
|
||||||
|
if (isset($_SERVER['SERVER_SOFTWARE'])
|
||||||
|
&& stristr($_SERVER['SERVER_SOFTWARE'], 'Microsoft/IIS')) {
|
||||||
|
define('PMA_IS_IIS', 1);
|
||||||
|
} else {
|
||||||
|
define('PMA_IS_IIS', 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function PMA_dl($module) {
|
function PMA_dl($module) {
|
||||||
if (!isset($GLOBALS['PMA_dl_allowed'])) {
|
if (!isset($GLOBALS['PMA_dl_allowed'])) {
|
||||||
if (!@ini_get('safe_mode') && @ini_get('enable_dl') && @function_exists('dl')) {
|
if (!@ini_get('safe_mode') && @ini_get('enable_dl') && @function_exists('dl')) {
|
||||||
|
@@ -264,7 +264,7 @@ if ($is_gotofile) {
|
|||||||
// on the resulting page
|
// on the resulting page
|
||||||
// Nijel: we also need to limit size of url...
|
// Nijel: we also need to limit size of url...
|
||||||
$add_query = (!$seen_binary && strlen($sql_query) < 1024 ? '&disp_query=' . urlencode($sql_query) : '');
|
$add_query = (!$seen_binary && strlen($sql_query) < 1024 ? '&disp_query=' . urlencode($sql_query) : '');
|
||||||
header('Location: ' . $cfg['PmaAbsoluteUri'] . $goto . '&disp_message=' . urlencode($message) . $add_query);
|
PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . $goto . '&disp_message=' . urlencode($message) . $add_query);
|
||||||
}
|
}
|
||||||
exit();
|
exit();
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user