Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fopen on windows

Status
Not open for further replies.

dinger2121

Programmer
Sep 11, 2007
439
US
Hello,
I am attempting to use fopen to open a php file on windows in read mode, but it keeps failing. I am assuming that this is a permissions issue, but I don't know what user to give access to this directory. what user does apache use to access files?

Thanks for any help.

carl
MCSD, MCTS:MOSS
 
running this script will tell you the user that will need perms on the relevant directory

Code:
echo get_current_user();
 
Thanks - it is the System Account. That has all of the correct permissions, but I am getting an error - no such file or directory.
If I browse to the location it is specifying, the file does exist. any thoughts what my problem might be? I am using $_SERVER['DOCUMENT_ROOT'] to get the location for the file to read, but it can't seem to find it.

carl
MCSD, MCTS:MOSS
 
I was able to get it working. $_SERVER['DOCUMENT_ROOT'] was returning the root site, but was not looking to the individual folders below the root directory. I added the full path into my variables and now it is working.

Thanks for the help.

carl
MCSD, MCTS:MOSS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top