Jump to content

Please help me with this error message failed to open stream: Permission denied


Recommended Posts

Hi guys,

 

I'm developing a web application to read some files that are included in my intranet the problem is that all the time I'm getting the next error: "failed to open stream: Permission denied" and is impossible to read them. I'm using apache web server running on winxp and my php version is 5.3.0. I'm using to do that the next code:

 

<?php

 

$file = fopen("//servername/shared/TMPFiles/file.txt","r") or exit("Unable to open file!");

 

while(!feof($file))

{

echo fgets($file). "<br />";

}

 

//some code to be executed

 

fclose($file);

?>

 

In fact my text file called file.txt has permissions for reading and writing. Any suggestion to solve it?

 

Thanks in advanced!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.