Summary | maint_url doubles up under php5 ran as cgi |
Queue | Horde Framework Packages |
Queue Version | FRAMEWORK_3 |
Type | Bug |
State | Duplicate |
Priority | 1. Low |
Owners | |
Requester | brandon.evans (at) gmail (dot) com |
Created | 01/05/2007 (6837 days ago) |
Due | |
Updated | 01/06/2007 (6836 days ago) |
Assigned | 01/05/2007 (6837 days ago) |
Resolved | 01/06/2007 (6836 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Duplicate
ticket #4151http://us2.php.net/manual/en/ini.core.php#ini.cgi.fix-pathinfo
same results. maint_url is still doubling up.
For the record I am running php 5.1.6
I also verified that without the fix I mentioned $url first becomes
PHP_SELF then PATH_INFO is added to it when maintenance mode is called.
State ⇒ Feedback
http://us2.php.net/manual/en/ini.core.php#ini.cgi.fix-pathinfo
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ maint_url doubles up under php5 ran as cgi
Queue ⇒ Horde Framework Packages
State ⇒ Unconfirmed
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' )