#41767 [Opn->Fbk]: realpath() is not working properly now
| From: | sniper@php.net | Date: | Thu, 21 Jun 2007 19:16:55 +0000 |
| Subject: | #41767 [Opn->Fbk]: realpath() is not working properly now | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-114033@lists.php.net to get a copy of this message | ||
ID: 41767
Updated by: sniper@php.net
Reported By: programatorfreez at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Filesystem function related
Operating System: GNU/Linux
PHP Version: 5.2.3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows (zip):
http://snaps.php.net/win32/php5.2-win32-latest.zip
For Windows (installer):
http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
Previous Comments:
------------------------------------------------------------------------
[2007-06-21 16:16:37] programatorfreez at gmail dot com
Description:
------------
Hello,
In PHP <= 5.2.2 realpath('.") will return realpath to current working
directory (for example /var/www/localhost/htdocs/mypages) but in PHP
5.2.3 function realpath('.') causes openbase_dir restriction related
error.
Reason
======
echo realpath('/var/www/localhost/htdocs/mypages/'); in PHP <= 5.2.2
works, but in PHP 5.2.3 causes openbase_dir restriction error with
something like "You have not access to
/var/www/localhost/htdocs/mypages' (it's because the final slash is
missing) the openbase_dir in php.ini is set to
"/var/www/localhost/htdocs/mypages/", function realpath will cut the
final slash and this will lead to error.
Reproduce code:
---------------
<?php
echo 'It's described above =)';
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41767&edit=1