Closed (fixed)
Project:
Drupal core
Version:
4.5.4
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Jul 2005 at 21:31 UTC
Updated:
7 Jul 2006 at 10:01 UTC
The "request_uri" function in bootstrap.inc does not work correctly under IIS 5 (Windows 2000).
I've hacked the function as follows so that it responds correctly. Without this fix, form actions are blank, which IIS does not deal well with. The fix is probably incomplete and/or inelegant, but it works.
Jeff Bellsey
/**
* Since request_uri() is only available on Apache, we generate an
* equivalent using other environment vars.
*/
function request_uri() {
// fixed for IIS
$uri = $_SERVER['SCRIPT_NAME'];
if ($_SERVER['QUERY_STRING'] != '') {
$uri .= '?'.$_SERVER['QUERY_STRING'];
}
$_SERVER['REQUEST_URI'] = $REQUEST_URI;
/*
if (isset($_SERVER['REQUEST_URI'])) {
$uri = $_SERVER['REQUEST_URI'];
}
else {
if (isset($_SERVER['argv'])) {
$uri = $_SERVER['PHP_SELF'] .'?'. $_SERVER['argv'][0];
}
else {
$uri = $_SERVER['PHP_SELF'] .'?'. $_SERVER['QUERY_STRING'];
}
}
*/
Comments
Comment #1
Uwe Hermann commentedCan somebody with IIS please test if this still applies to HEAD?
Comment #2
killes@www.drop.org commentedI suppose that got fixed somehow, otherwise we'd see more reports like this. Maybe you need a more recent Drupal, though.
Comment #3
(not verified) commented