ID: 35186
User updated by: samm at os2 dot kiev dot ua
Reported By: samm at os2 dot kiev dot ua
Status: Open
Bug Type: Apache2 related
Operating System: FreeBSD 6
PHP Version: 4.4.1
New Comment:
I forgot to say that i use php as shared Apache 2.0 module with apache
2.0.54
Previous Comments:
------------------------------------------------------------------------
[2005-11-10 22:46:47] samm at os2 dot kiev dot ua
Description:
------------
When i use getcwd() function in my script which work with mod_rewrite i
got "/" instead of real path. Without mod_rewrite redirection all work
just fine. I check this with STABLE-200511101949 snapshot. With php
4.4.0 all work as expected.
Reproduce code:
---------------
To reproduce this bug do:
1) Enable mod_rewrite in apache2 config file
2) make .htaccess file with content like:
RewriteEngine on
RewriteRule ^test.html$ test.php [L]
and place it in your virtual server root directory.
3) Create file "test.php" with content like
<? echo getcwd() ?>
and then point your browser to the "yoursever/test.html".
Then try yoursever/test.php
Expected result:
----------------
real path, same in 2 examples, e.g.
/usr/home/samm/htdocs
/usr/home/samm/htdocs
Actual result:
--------------
/
/usr/home/samm/htdocs
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35186&edit=1