[Tickets #4137] NEW: Wrong Path from inc/Horde.lib - selfUrl with FastCGI
bugs@bugs.horde.org
bugs at bugs.horde.org
Sun Jul 9 06:33:12 PDT 2006
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=4137
-----------------------------------------------------------------------
Ticket | 4137
Created By | eric at wwwx.de
Summary | Wrong Path from inc/Horde.lib - selfUrl with FastCGI
Queue | Horde Framework Packages
Version | FRAMEWORK_3
State | Unconfirmed
Priority | 1. Low
Type | Bug
Owners |
-----------------------------------------------------------------------
eric at wwwx.de (2006-07-09 06:33) wrote:
I got the wrong Path from selfUrl with PHP 4.4.2 and FastCGI.
Bugfix :
Change selfUrl to :
function selfUrl($script_params = false, $nocache = true, $full =
false,
$force_ssl = false)
{
if (substr(php_sapi_name(), 0, 3) == 'cgi') {
// When using CGI PHP, SCRIPT_NAME may contain the path to
// the PHP binary instead of the script being run; use
// PHP_SELF instead.
$url = $_SERVER['PHP_SELF'];
} else {
$url = isset($_SERVER['SCRIPT_NAME']) ?
$_SERVER['SCRIPT_NAME'] :
$_SERVER['PHP_SELF'];
}
if ($script_params) {
if (substr(php_sapi_name(), 0, 7) == 'cgi-fcgi') {
if (!empty($_SERVER['PATH_INFO'])) {
$url .= $_SERVER['PATH_INFO'];
}
};
if (!empty($_SERVER['QUERY_STRING'])) {
$url .= '?' . $_SERVER['QUERY_STRING'];
}
...
My PHP Compile Options :
./configure' '--with-config-file-path=/etc/httpd' '--with-gd=yes'
'--with-freetype-dir=/usr' '--with-jpeg-dir=/usr' '--with-png-dir=/usr'
'--with-zlib-dir=/usr' '--with-mysql=/usr' '--with-gd=/usr'
'--enable-memory-limit' '--enable-force-cgi-redirect'
'--enable-track-vars' '--with-openssl=/usr' '--without-mm'
'--enable-fastcgi' '--prefix=/usr/local/phpfcgi' '--with-gettext'
'--with-dom' '--with-imap' '--with-ldap' '--with-kerberos'
'--with-imap-ssl'
More information about the bugs
mailing list