[Tickets #4846] maint_url doubles up under php5 ran as cgi
bugs@bugs.horde.org
bugs at bugs.horde.org
Thu Jan 4 16:48:06 PST 2007
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=4846
-----------------------------------------------------------------------
Ticket | 4846
Created By | brandon.evans at gmail.com
Summary | maint_url doubles up under php5 ran as cgi
Queue | Horde Framework Packages
Version | FRAMEWORK_3
Type | Bug
State | Unconfirmed
Priority | 1. Low
Owners |
-----------------------------------------------------------------------
brandon.evans at gmail.com (2007-01-04 16:48) wrote:
I was experiencing a problem in the latest Horde 3.1.3 where maint_url was
doubling up when maintenance mode was ran.
e.g. $template->set('maint_url', $maint->getMaintenanceFormURL()); from
the services/maintenance.php would be returned as
/horde/imp/redirect.php/horde/imp/redirect.php?maintenance_done=1&domaintenance=1
I tracked the problem down to the Horde::selfUrl(true) function call.
in lib/Horde.php selfUrl function.
if called with script_params == true && php_sapi_name(), 0, 3) == 'cgi
$url becomes equal to $_SERVER['PHP_SELF'];
$url = $_SERVER['PHP_SELF'];
Next the code hits "if ($script_params)" and adds "$_SERVER['PATH_INFO'];"
to $url
$url .= $_SERVER['PATH_INFO'];
thereby doubling the $url string.
this is easily fixed by changing
if ($script_params)
to
if ($script_params && substr(php_sapi_name(), 0, 3) != 'cgi' )
More information about the bugs
mailing list