PhP 4.3.0 Relative includes and Apache Alias problems.

0 views
Skip to first unread message

qu...@mydiax.ch

unread,
Jan 10, 2003, 12:17:15 PM1/10/03
to php-g...@lists.php.net
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

Reply all
Reply to author
Forward
0 new messages