...

View Full Version : Opening files outside the webserver folder



kramx7
01-24-2007, 09:40 AM
The disk space of the drive where my webserver folder is located is low.
So i decided to put the other files in a separate drive outside from the webserver folder.

I made my page in windows desktop. and i used this commands to open the file. and it works.

$filename = "D:/biography.html";
include($filename);

when i transfer my code into the server which is mac it won't work.
i already change directory in mac.

I hope someone would help me with this?
Thanks...

aedrin
01-24-2007, 04:43 PM
Did you verify that the webserver process (Apache for instance) has permissions to read outside of its DocumentRoot and that specific directory you are trying to access?


when i transfer my code into the server which is mac it won't work.

It helps to give some information about your environment and exactly what the error message is. It is easier that way for someone to help you.

For instance, it would help to know what webserver you are running.

kramx7
01-25-2007, 01:55 AM
All the php settings is still set to default. I look in the DocumentRoot setting and this is its value _SERVER["DOCUMENT_ROOT"] = /Library/WebServer/Documents.

How do i set the webserver to read outside the Document Root?

These are the error messages...

Warning: main(Volumes/Movies & More/opac/44352/) [function.main]: failed to open stream: No such file or directory in /Library/WebServer/Documents/lib/OPAC/opac.php on line 14

Warning: main() [function.include]: Failed opening 'Volumes/Movies & More/opac/44352/' for inclusion (include_path='.:') in /Library/WebServer/Documents/lib/OPAC/opac.php on line 14

aedrin
01-25-2007, 05:14 PM
Are you specifying an actual file to include?



Warning: main() [function.include]: Failed opening 'Volumes/Movies & More/opac/44352/' for inclusion (include_path='.:') in /Library/WebServer/Documents/lib/OPAC/opac.php on line 14


This makes it sound like it is trying to include the directory 'Volumes/Movies & More/opac/44352/', which to my knowledge is not possible.

kramx7
01-26-2007, 06:44 AM
Actually i'm including a directory because i assume that the index file or home file will be shown when i do that.

Does it work like that?

GJay
01-26-2007, 08:38 AM
no, it doesn't.

ALso, should you not have a / at the beginning of the filepath as well?

cookieboi
01-26-2007, 08:27 PM
suerly you need the other drive to be accessable from the web for clients to view the files of the other drive??



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum