Forum Moderators: coopster

Message Too Old, No Replies

Strange Include problem

         

bleak26

11:10 am on Jun 4, 2007 (gmt 0)

10+ Year Member



We are currently having an issue with includes on our system since the upgrade to php5. Including a file in the same folder works fine and we can include using the full path to the file and we can include using a URL to get the file but as soon as we use ../ or ./ we receive the message that

Warning: include(../navigation/navsideworkshop.php) [function.include]: failed to open stream: No such file or directory in /data3/web/sites/www.example.co.uk/workshops/index.php on line 26

Also we found that if we are in the folder containing the file, we cannot use ../ to go out of the directory and then back into it with the foldername.
Eg: include("../folder_running_script_is_in/navsideworkshop.php");

Thankyou for all your help

[edited by: eelixduppy at 1:10 pm (utc) on June 4, 2007]
[edit reason] use example.co.uk for exemplification [/edit]

joelgreen

2:15 pm on Jun 4, 2007 (gmt 0)

10+ Year Member



Maybe include path is restricted to only this folder, so you cannot include anything above the folder.

bleak26

2:42 pm on Jun 4, 2007 (gmt 0)

10+ Year Member



Hi joel

Thankyou for the swift reply.

Even if we move the file down one folder, we still cannot include a file from the folder we just moved from.