Derick Rethans
|
Wednesday 12 January 2005 12:45:58 am
I think this is a bug, which I fixed (but not committed yet). Can you try the following:
Index: lib/ezutils/classes/ezsys.php
===================================================================
--- lib/ezutils/classes/ezsys.php (revision 10512)
+++ lib/ezutils/classes/ezsys.php (working copy)
@@ -615,7 +615,7 @@
\return the variable named \a $variableName in the global \c $_SERVER variable.
If the variable is not present an error is shown and \c null is returned.
*/
- function &serverVariable( $variableName, $quiet = false )
+ function serverVariable( $variableName, $quiet = false )
{
if ( !isset( $_SERVER[$variableName] ) )
{
@@ -780,6 +780,7 @@
eZDebug::writeNotice( eZSys::serverVariable( 'PHP_SELF' ), 'PHP_SELF' );
eZDebug::writeNotice( eZSys::serverVariable( 'SCRIPT_FILENAME' ), 'SCRIPT_FILENAME' );
eZDebug::writeNotice( eZSys::serverVariable( 'DOCUMENT_ROOT' ), 'DOCUMENT_ROOT' );
+ eZDebug::writeNotice( eZSys::serverVariable( 'REQUEST_URI' ), 'REQUEST_URI' );
eZDebug::writeNotice( ini_get( 'include_path' ), 'include_path' );
}
@@ -825,6 +826,7 @@
$scriptName = eZSys::serverVariable( 'SCRIPT_NAME' );
// Get the webdir.
+ $wwwDir = "";
if ( $force_VirtualHost && ! $isCGI )
{
$wwwDir = "";
@@ -868,7 +870,18 @@
// Get the right $_SERVER['REQUEST_URI'], when using nVH setup.
if ( ereg( "^$wwwDir$index(.*)", $phpSelf, $req ) )
{
- $requestURI = $req[1];
+ if (! $req[1] )
+ {
+ if ( ereg( "^$wwwDir(.*)", $requestURI, $req ) )
+ {
+ $requestURI = $req[1];
+ $index = '';
+ }
+ }
+ else
+ {
+ $requestURI = $req[1];
+ }
}
}
}
The reason why it's not committed yet because I couldn't test it in a lot of different situations yet.
|