| 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 | 1/5/07 (7113 days ago) |
| Due | |
| Updated | 1/6/07 (7112 days ago) |
| Assigned | 1/5/07 (7113 days ago) |
| Resolved | 1/6/07 (7112 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' )