Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-24-2007, 08:40 AM   PM User | #1
kramx7
New Coder

 
Join Date: Apr 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
kramx7 is an unknown quantity at this point
Opening files outside the webserver folder

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...
kramx7 is offline   Reply With Quote
Old 01-24-2007, 03:43 PM   PM User | #2
aedrin
Senior Coder

 
Join Date: Jan 2007
Posts: 1,648
Thanks: 1
Thanked 58 Times in 54 Posts
aedrin will become famous soon enough
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?

Quote:
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.
aedrin is offline   Reply With Quote
Old 01-25-2007, 12:55 AM   PM User | #3
kramx7
New Coder

 
Join Date: Apr 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
kramx7 is an unknown quantity at this point
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
kramx7 is offline   Reply With Quote
Old 01-25-2007, 04:14 PM   PM User | #4
aedrin
Senior Coder

 
Join Date: Jan 2007
Posts: 1,648
Thanks: 1
Thanked 58 Times in 54 Posts
aedrin will become famous soon enough
Are you specifying an actual file to include?

Quote:
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.
aedrin is offline   Reply With Quote
Old 01-26-2007, 05:44 AM   PM User | #5
kramx7
New Coder

 
Join Date: Apr 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
kramx7 is an unknown quantity at this point
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?
kramx7 is offline   Reply With Quote
Old 01-26-2007, 07:38 AM   PM User | #6
GJay
Senior Coder

 
Join Date: Sep 2005
Posts: 1,791
Thanks: 5
Thanked 36 Times in 35 Posts
GJay is on a distinguished road
no, it doesn't.

ALso, should you not have a / at the beginning of the filepath as well?
__________________
My thoughts on some things: http://codemeetsmusic.com
And my scrapbook of cool things: http://gjones.tumblr.com
GJay is offline   Reply With Quote
Old 01-26-2007, 07:27 PM   PM User | #7
cookieboi
New Coder

 
Join Date: Jan 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
cookieboi is an unknown quantity at this point
suerly you need the other drive to be accessable from the web for clients to view the files of the other drive??
__________________
woooooo!

visit my website:
click here!
cookieboi is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:35 AM.


Advertisement
Log in to turn off these ads.