ID: 41767 Updated by: [EMAIL PROTECTED] Reported By: programatorfreez at gmail dot com -Status: Open +Status: Bogus Bug Type: Filesystem function related Operating System: GNU/Linux PHP Version: 5.2.3 New Comment:
Works fine for me. Previous Comments: ------------------------------------------------------------------------ [2007-06-22 18:04:02] programatorfreez at gmail dot com Actually i'm happy that my PHP 5.2.2 is working and unfortunatelly i don't have enough time to compile CVS version and then stable again. I'll wait until it will be in Gentoo portage, it's the best way for me. Do you have installed CVS version? If so, please try: ----------------------------- <?php echo realpath('./'); ?> ----------------------------- The directory with script must be in php.ini -> open_basedir, don't forget to add the final slash. Safe mode must be on. The result with PHP 5.2.2 is something like /var/www/localhost/htdocs/mypages. With PHP 5.2.3 the result is similar to open_basedir restriction in affect, directory /var/www/localhost/htdocs/mypages is not in allowed path. PHP 5.2.3 is actually running only on webhosting, where are stored my pages. Thanks for a try ------------------------------------------------------------------------ [2007-06-21 19:16:55] [EMAIL PROTECTED] 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 ------------------------------------------------------------------------ [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