From: tdrake at tymail dot com Operating system: Redhat Linux 9 PHP version: 4.3.2 PHP Bug Type: Apache2 related Bug description: PHP/Apache Fails to process scripts that use "Clean URLs"
I'm not really sure if this is a problem with php or with apache2, but here goes. I use a technique called "Clean URLs" to make better use of get variables. The idea behind it is to allow both simplification and obfusication of URLs when working with GET variables. An example of a "Clean URL" would be: http://servername/index.php/foo/bar Instead of: http://servername/index.php?var1=foo&var2=bar This technique has worked fine for me in the past, but has since stopped working after upgrading to Apache 2 and PHP 4.3.2. I now get an apache 404 error when the extra /'s are added to the url line. The following script works when using apache 1.x but not 2.x. <? $url = explode("/", $PHP_SELF); $getvars=array(); while (list($key, $value) = each($url)) { if (ereg("=", $value)) { list($var_name, $val) = explode("=",$value); $getvars[$var_name] = urldecode($val); } else { $getvars[$var_name] = $urldecode[$value]; } } $sysvars->HTTP_POST_VARS = $HTTP_POST_VARS; $sysvars->HTTP_GET_VARS = $getvars+$HTTP_GET_VARS; $sysvars->HTTP_COOKIE_VARS = $HTTP_COOKIE_VARS; // This should print the variables that were encoded in the URL. print_r($sysvars->HTTP_GET_VARS); ?> -- Edit bug report at http://bugs.php.net/?id=23901&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23901&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23901&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23901&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23901&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23901&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23901&r=support Expected behavior: http://bugs.php.net/fix.php?id=23901&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23901&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23901&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23901&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23901&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23901&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23901&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23901&r=gnused