ID: 24520
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Bogus
Bug Type: Apache related
Operating System: Win2000 NT
PHP Version: 4.3.3RC2-dev
New Comment:
Works fine here with these settings:
<VirtualHost *>
ServerName localhost
RewriteEngine on
RewriteRule ([a-z]+)?/?([0-9]+) /rewrite.php?job_sid=$2&theme=$1
DocumentRoot /www/apache/htdocs/
php_value register_globals 1
</VirtualHost>
You propably just have something wrong with your settings.
Previous Comments:
------------------------------------------------------------------------
[2003-07-07 10:04:17] [EMAIL PROTECTED]
Same behaviour.
------------------------------------------------------------------------
[2003-07-07 05:42:45] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-07-07 05:35:46] [EMAIL PROTECTED]
The actual RewriteRule is:
RewriteRule ([a-z]+)?/?([0-9]+) job_view.php?job_sid=$2&theme=$1
which excludes the slash (/) from the $theme variable. As described,
theme should be string(5) "gray/".
------------------------------------------------------------------------
[2003-07-07 05:27:50] [EMAIL PROTECTED]
Description:
------------
When I write some RewriteRule with additional "redirected" variables,
they seem to be empty in my script.
RewriteRule ([a-z]+/)?([0-9]+) job_view.php?job_sid=$2&theme=$1
When I call the following URL "http://localhost/gray/56", I expect in
my script to have these variables:
job_sid => string(2) "56"
theme => string(4) "gray"
But what var_dump($job_sid) and var_dump($theme) actually tells me is:
job_sid => string(2) "56"
theme => string(0) ""
Note that $theme is an empty string, but not null.
The weirdest thing is that var_dump($_GET) shows correct result:
array(2) {
["job_sid"]=>
string(2) "56"
["theme"]=>
string(4) "gray"
}
I forgot to mention, that I have register_globals=On, so I expect ALL
of my $_GET variables to be registered as globals.
Reproduce code:
---------------
var_dump($_GET);
var_dump($job_sid);
var_dump($theme);
Expected result:
----------------
array(2) {
["job_sid"]=>
string(2) "56"
["theme"]=>
string(4) "gray"
}
string(2) "56"
string(4) "gray"
Actual result:
--------------
array(2) {
["job_sid"]=>
string(2) "56"
["theme"]=>
string(4) "gray"
}
string(2) "56"
string(0) ""
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24520&edit=1