php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47442 realpath() returns null for the apache alias directory
Submitted: 2009-02-18 19:40 UTC Modified: 2009-02-19 11:06 UTC
From: msong at targetcastnetworks dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 5.2.9RC2 OS: win32 only - windows xp
Private report: No CVE-ID: None
 [2009-02-18 19:40 UTC] msong at targetcastnetworks dot com
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-19 11:06 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

PHP knows nothing about Apache configuration.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 14:01:31 2024 UTC