according to rfc 2816, the location http header requires an absolute URI

This commit is contained in:
Loïc Chapeaux
2001-08-20 19:08:29 +00:00
parent 0ec91a1692
commit c3d62b3988
9 changed files with 37 additions and 13 deletions

View File

@@ -20,8 +20,14 @@ $Source$
#444767 (Other cases for display=simple). #444767 (Other cases for display=simple).
* user_details.php3: fixed some javascript bugs. * user_details.php3: fixed some javascript bugs.
* tbl_change.php3, lines 26 & 31: added some mysql_die() calls. * tbl_change.php3, lines 26 & 31: added some mysql_die() calls.
* lib.inc.php3, lines 135 & 147: go back to the previous calling script * lib.inc.php3, lines 135 & 147: in case of error in a query, go back to the
that is not a confirmation form. previous calling script that is not a confirmation form.
Fixed also a js bug line 147.
* config.inc.php3, lines 27-33; Documentation.html, lines 238-246;
db_details.php3, line 37; sql.php3, lines 20, 53 & 184;
tbl_properties.php3, lines 45 & 51; tbl_replace, line 143 & 252;
tbl_select.php3, line 181: according to rfc 2816, the location http
header requires an absolute URI.
2001-08-19 Olivier M<>ller <om@omnis.ch> 2001-08-19 Olivier M<>ller <om@omnis.ch>
* db_readdump.php3: if file contains mutiple queries, only show this line: * db_readdump.php3: if file contains mutiple queries, only show this line:

View File

@@ -235,6 +235,15 @@
<p>All configurable data is placed in <i>config.inc.php3</i>.</p> <p>All configurable data is placed in <i>config.inc.php3</i>.</p>
<dl> <dl>
<dt><b>$cfgPmaAbsoluteUri</b> string</dt>
<dd>
Sets here the complete url (with full path) to your phpMyAdmin version.
E.g. <tt>http://www.your_web.net/path_to_your_phpMyAdmin_directory/</tt>.
<br />
Don't forget the slash at the end of your url.
<br /><br />
</dd>
<dt><b>$cfgServers</b> array</dt> <dt><b>$cfgServers</b> array</dt>
<dd> <dd>
Since version 1.4.2, phpMyAdmin supports the administration of multiple Since version 1.4.2, phpMyAdmin supports the administration of multiple

View File

@@ -24,6 +24,15 @@
*/ */
/**
* Your phpMyAdmin url
*
* Complete the variable below with the full url ie
* http://www.your_web.net/path_to_your_phpMyAdmin_directory/
*/
$cfgPmaAbsoluteUri = '';
/** /**
* Server(s) configuration * Server(s) configuration
*/ */
@@ -82,7 +91,7 @@ unset($cfgServers[0]);
$cfgConfirm = TRUE; // confirm 'DROP TABLE' & 'DROP DATABASE' $cfgConfirm = TRUE; // confirm 'DROP TABLE' & 'DROP DATABASE'
$cfgPersistentConnections = FALSE; // use persistent connections to MySQL database $cfgPersistentConnections = FALSE; // use persistent connections to MySQL database
$cfgShowBlob = FALSE; // display blob field contents in browse mode $cfgShowBlob = FALSE; // display blob field contents in browse mode
$cfgProtectBlob = TRUE; // disallow editing of blob fields in edit mode $cfgProtectBlob = TRUE; // disallow editing of blob fields in edit mode
$cfgShowSQL = TRUE; // show SQL queries as run $cfgShowSQL = TRUE; // show SQL queries as run
$cfgSkipLockedTables = FALSE; // mark used tables, make possible to show $cfgSkipLockedTables = FALSE; // mark used tables, make possible to show
// locked tables (since MySQL 3.23.30) // locked tables (since MySQL 3.23.30)

View File

@@ -34,7 +34,7 @@ $tables = mysql_list_tables($db);
$num_tables = @mysql_numrows($tables); $num_tables = @mysql_numrows($tables);
// Not a valid db name -> back to the welcome page // Not a valid db name -> back to the welcome page
if (mysql_error() != '') { if (mysql_error() != '') {
header('Location: main.php3?lang=' . $lang . '&server=' . $server . '&reload=true'); header('Location: ' . $cfgPmaAbsoluteUri . 'main.php3?lang=' . $lang . '&server=' . $server . '&reload=true');
exit(); exit();
} }

View File

@@ -144,7 +144,7 @@ if (!defined('__LIB_INC__')){
echo '<p>' . "\n"; echo '<p>' . "\n";
echo ' ' . $GLOBALS['strMySQLSaid'] . '&nbsp;' . htmlspecialchars($error_message) . "\n"; echo ' ' . $GLOBALS['strMySQLSaid'] . '&nbsp;' . htmlspecialchars($error_message) . "\n";
echo '</p>' . "\n"; echo '</p>' . "\n";
echo '<a href="javascript:history.go(' . $hist . ')">' . $GLOBALS['strBack'] . '</a>'; echo '<a href="javascript:window.history.go(' . $hist . ')">' . $GLOBALS['strBack'] . '</a>';
include('./footer.inc.php3'); include('./footer.inc.php3');
exit(); exit();

View File

@@ -17,7 +17,7 @@ if (isset($store_bkm)) {
$fields['label'] = stripslashes($fields['label']); $fields['label'] = stripslashes($fields['label']);
} }
add_bookmarks($fields, $cfgBookmark); add_bookmarks($fields, $cfgBookmark);
header('Location: ' . $goto); header('Location: ' . $cfgPmaAbsoluteUri . $goto);
} }
@@ -50,7 +50,7 @@ if (isset($btnDrop) && $btnDrop == $strNo) {
if (file_exists('./' . $goto)) { if (file_exists('./' . $goto)) {
include('./' . ereg_replace('\.\.*', '.', $goto)); include('./' . ereg_replace('\.\.*', '.', $goto));
} else { } else {
header('Location: ' . $goto); header('Location: ' . $cfgPmaAbsoluteUri . $goto);
} }
exit(); exit();
} // end if } // end if
@@ -181,7 +181,7 @@ else {
} // end if file_exist } // end if file_exist
else { else {
$message = $zero_rows; $message = $zero_rows;
header('Location: ' . $goto); header('Location: ' . $cfgPmaAbsoluteUri . $goto);
} // end else } // end else
exit(); exit();
} // end no rows returned } // end no rows returned

View File

@@ -42,13 +42,13 @@ unset($sql_query);
$is_db = @mysql_select_db($db); $is_db = @mysql_select_db($db);
// Not a valid db name -> back to the welcome page // Not a valid db name -> back to the welcome page
if (!$is_db) { if (!$is_db) {
header('Location: main.php3?lang=' . $lang . '&server=' . $server . '&reload=true'); header('Location: ' . $cfgPmaAbsoluteUri . 'main.php3?lang=' . $lang . '&server=' . $server . '&reload=true');
exit(); exit();
} }
$is_table = @mysql_query('SHOW TABLES LIKE \'' . sql_addslashes($table, TRUE) . '\''); $is_table = @mysql_query('SHOW TABLES LIKE \'' . sql_addslashes($table, TRUE) . '\'');
// Not a valid table name -> back to the db_details.php3 // Not a valid table name -> back to the db_details.php3
if (!@mysql_numrows($is_table)) { if (!@mysql_numrows($is_table)) {
header('Location: db_details.php3?lang=' . $lang . '&server=' . $server . '&db=' . urlencode($db) . '&reload=true'); header('Location: ' . $cfgPmaAbsoluteUri . 'db_details.php3?lang=' . $lang . '&server=' . $server . '&db=' . urlencode($db) . '&reload=true');
exit(); exit();
} }

View File

@@ -140,7 +140,7 @@ if (isset($primary_key) && ($submit_type != $strInsertAsNewRow)) {
$message = $strNoModification; $message = $strNoModification;
include('./' . ereg_replace('\.\.*', '.', $goto)); include('./' . ereg_replace('\.\.*', '.', $goto));
} else { } else {
header('Location: ' . $goto); header('Location: ' . $cfgPmaAbsoluteUri . $goto);
} }
exit(); exit();
} }
@@ -249,7 +249,7 @@ if (!$result) {
$message = $strModifications; $message = $strModifications;
include('./' . ereg_replace('\.\.*', '.', $goto)); include('./' . ereg_replace('\.\.*', '.', $goto));
} else { } else {
header('Location: ' . $goto); header('Location: ' . $cfgPmaAbsoluteUri . $goto);
} }
exit(); exit();
} // end if } // end if

View File

@@ -178,7 +178,7 @@ else {
. '&pos=0' . '&pos=0'
. '&sessionMaxRows=' . $sessionMaxRows . '&sessionMaxRows=' . $sessionMaxRows
. '&goto=db_details.php3'; . '&goto=db_details.php3';
header('Location: sql.php3?' . $url_query); header('Location: ' . $cfgPmaAbsoluteUri . 'sql.php3?' . $url_query);
} }
?> ?>