From: msong at targetcastnetworks dot com
Operating system: Window XP
PHP version: 5.2.9RC2
PHP Bug Type: *Directory/Filesystem functions
Bug description: realpath() returns null for the apache alias directory
Description:
------------
I try to use the realpath() call to get the absolute file path for a file.
The file is located on the directory that was specified as a apache alias
directory. Following is the alias set up in Apache httpd.conf:
Alias /tctv/testimages "//192.168.1.125/tcshare/Logs/images"
<Directory "//192.168.1.125/tcshare/Logs/images">
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Here is the php snippet to make a realpath() call:
<?
...
echo "realpath=" . realpath("./testimages") . "<BR>";
...
?>
I do expect it returns "//192.168.1.125/tcshare/Logs/images", however, it
returns null.
I will appreciate if someone can help me on this.
-Mike
Reproduce code:
---------------
Alias /tctv/testimages "//192.168.1.125/tcshare/Logs/images"
<Directory "//192.168.1.125/tcshare/Logs/images">
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Here is the php snippet to make a realpath() call:
<?
...
echo "realpath=" . realpath("./testimages") . "<BR>";
...
?>
Expected result:
----------------
I do expect it returns "//192.168.1.125/tcshare/Logs/images", however, it
returns null.
--
Edit bug report at http://bugs.php.net/?id=47442&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47442&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47442&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47442&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47442&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=47442&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47442&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=47442&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=47442&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=47442&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=47442&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=47442&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=47442&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=47442&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47442&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47442&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47442&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=47442&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=47442&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=47442&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=47442&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=47442&r=mysqlcfg