#41767 [NEW]: realpath() is not working properly now
| From: | programatorfreez at gmail dot com | Date: | Thu, 21 Jun 2007 16:16:37 +0000 |
| Subject: | #41767 [NEW]: realpath() is not working properly now | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-114027@lists.php.net to get a copy of this message | ||
From: programatorfreez at gmail dot com
Operating system: GNU/Linux
PHP version: 5.2.3
PHP Bug Type: Filesystem function related
Bug description: realpath() is not working properly now
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 bug report at http://bugs.php.net/?id=41767&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41767&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41767&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41767&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41767&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41767&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41767&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41767&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41767&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41767&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41767&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41767&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41767&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41767&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41767&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41767&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41767&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41767&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41767&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41767&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41767&r=mysqlcfg