PhP 4.3.0 Relative includes and Apache Alias problems.
| From: | quak at mydiax dot ch | Date: | Fri, 10 Jan 2003 17:17:15 +0000 |
| Subject: | PhP 4.3.0 Relative includes and Apache Alias problems. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-131145@lists.php.net to get a copy of this message | ||
Greetings,
Why is that, that when we try to issue a include statement, which has any kind of
"Relative" path in it, it will fail if the php script is mapped into apache web tree by
"Alias" Statement ?
An example: We have:
/a/b/one.php
/a/c/two.php
/a/three.php
Apache Alias stament is:
Alias /test "/a/"
If we run: include('../c/two.php'); from one.php, it will result in error: failed to
create stream: No such file or directory.
If we run: include('c/two.php'); from three.php it will result in suiccess.
If we run: include('./c/two.php'); from three.php it will fail as in first example.
If we just copy the whole /a into the web server document root, all examples will work.
Is that some kind of security feature or a bug ?
Regards
Kirill