[PHP] failed to open stream: Permission denied

[PHP] failed to open stream: Permission denied

am 15.11.2007 15:28:39 von Andy2500

Hi,

I'd like to upload an image to a folder, then I have 3
diffrents examples but all of them give an error
"failed to open stream: Permission denied", althrough the
C:\Inetpub\wwwroot is not protected.

Any suggestions would be helpful, thank you for your time.


example_1 :

Warning: file_put_contents(31_picture.gif) [function.file-put-contents]:

failed to open stream: Permission denied in C:\Inetpub\wwwroot\AS\index.php

on line 46



example_2 :

Warning: move_uploaded_file

(C:\Inetpub\wwwroot/1c0c4541273310f11decbc7575daf1d8.bin) [function.move-

uploaded-file]: failed to open stream: Permission denied in

C:\Inetpub\wwwroot\file_api.php on line 58

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move

'C:\WINNT\TEMP\php198.tmp' to

'C:\Inetpub\wwwroot/1c0c4541273310f11decbc7575daf1d8.bin' in

C:\Inetpub\wwwroot\file_api.php on line 58



example_3 :

Warning: move_uploaded_file(./web/student_img/5054.jpg) [function.move-

uploaded-file]: failed to open stream: No such file or directory in

C:\Inetpub\wwwroot\web\editaccount.php on line 175

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move

'C:\WINNT\TEMP\php19C.tmp' to './web/student_img/5054.jpg' in

C:\Inetpub\wwwroot\web\editaccount.php on line 175

Re: [PHP] failed to open stream: Permission denied

am 15.11.2007 17:32:02 von Steve

"Andy2500" wrote in message
news:473c65aa$1_4@news.bluewin.ch...
> Hi,
>
> I'd like to upload an image to a folder, then I have 3
> diffrents examples but all of them give an error
> "failed to open stream: Permission denied", althrough the
> C:\Inetpub\wwwroot is not protected.

oddly enough, it is a permissions issue. this is running iis, correct? does
c:/inetpub/wwwroot allow read *and* write permission for IUSR_ here>?

Re: failed to open stream: Permission denied

am 15.11.2007 17:42:52 von darko

On Nov 15, 3:28 pm, "Andy2500" wrote:
> Hi,
>
> I'd like to upload an image to a folder, then I have 3
> diffrents examples but all of them give an error
> "failed to open stream: Permission denied", althrough the
> C:\Inetpub\wwwroot is not protected.
>
> Any suggestions would be helpful, thank you for your time.
>
> example_1 :
>
> Warning: file_put_contents(31_picture.gif) [function.file-put-contents]:
>
> failed to open stream: Permission denied in C:\Inetpub\wwwroot\AS\index.php
>
> on line 46
>
> example_2 :
>
> Warning: move_uploaded_file
>
> (C:\Inetpub\wwwroot/1c0c4541273310f11decbc7575daf1d8.bin) [function.move-
>
> uploaded-file]: failed to open stream: Permission denied in
>
> C:\Inetpub\wwwroot\file_api.php on line 58
>
> Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move
>
> 'C:\WINNT\TEMP\php198.tmp' to
>
> 'C:\Inetpub\wwwroot/1c0c4541273310f11decbc7575daf1d8.bin' in
>
> C:\Inetpub\wwwroot\file_api.php on line 58
>
> example_3 :
>
> Warning: move_uploaded_file(./web/student_img/5054.jpg) [function.move-
>
> uploaded-file]: failed to open stream: No such file or directory in
>
> C:\Inetpub\wwwroot\web\editaccount.php on line 175
>
> Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move
>
> 'C:\WINNT\TEMP\php19C.tmp' to './web/student_img/5054.jpg' in
>
> C:\Inetpub\wwwroot\web\editaccount.php on line 175

Maybe you should try switching to Linux. Windows is not really a bless
for programming, you know.
I don't know this answer, but if you were on Linux, 1. I would know 2.
You wouldn't need it.

Cheers

Re: failed to open stream: Permission denied

am 15.11.2007 18:18:38 von Steve

"Darko" wrote in message
news:295660f1-00b1-45ff-860b-afdd3070e855@41g2000hsh.googleg roups.com...
> On Nov 15, 3:28 pm, "Andy2500" wrote:

> Maybe you should try switching to Linux. Windows is not really a bless
> for programming, you know.
> I don't know this answer, but if you were on Linux, 1. I would know 2.
> You wouldn't need it.

so, because *you* know linux, the op won't have permissions issues? that
would be entirely false. *i* know windows *and* that fact doesn't help the
op in the least...unless i offer to share what i know.

either way, windows programming is just as easily done as linux programming.
the only main difference would be what libraries you're utilizing. and, as
far as that goes, mfc is hard to beat. let me tell you, borland on windows
ain't much different from borland on linux. :) for that matter, .net
development on either os isn't much different either.

cheers

Re: [PHP] failed to open stream: - cont. -

am 15.11.2007 20:43:35 von Andy2500

"Steve" wrote in message
news:5w__i.67$_X2.41@newsfe06.lga...
>
>>
>> I'd like to upload an image to a folder, then I have 3
>> diffrents examples but all of them give an error
>> "failed to open stream: Permission denied", althrough the
>> C:\Inetpub\wwwroot is not protected.
>
> oddly enough, it is a permissions issue. this is running iis, correct?
> does c:/inetpub/wwwroot allow read *and* write permission for IUSR_ > name here>?

Thank you for your reply.

>this is running iis, correct?
Yes, with WinXP SP2 & IIS 5.1

> c:/inetpub/wwwroot allow read *and* write permission for IUSR_ > here>?
yes it is. It allows read & write permission for IUSR_

> what should I have to check more ?

Thank you

Re: [PHP] failed to open stream: - cont. -

am 15.11.2007 22:21:16 von Steve

"Andy2500" wrote in message
news:473caf8a$1_4@news.bluewin.ch...
>
> "Steve" wrote in message
> news:5w__i.67$_X2.41@newsfe06.lga...
>>
>>>
>>> I'd like to upload an image to a folder, then I have 3
>>> diffrents examples but all of them give an error
>>> "failed to open stream: Permission denied", althrough the
>>> C:\Inetpub\wwwroot is not protected.
>>
>> oddly enough, it is a permissions issue. this is running iis, correct?
>> does c:/inetpub/wwwroot allow read *and* write permission for
>> IUSR_?
>
> Thank you for your reply.

not a problem.

>>this is running iis, correct?

> Yes, with WinXP SP2 & IIS 5.1

xp professional i presume...unless you hacked iis support in a lesser
version.

>> c:/inetpub/wwwroot allow read *and* write permission for IUSR_ >> name here>?

> yes it is. It allows read & write permission for IUSR_

so php is running fine, indicating that php initiated by a web hit does in
fact have permissions to read/parse .php files. ok, see if you can make a
simple script that fopen's a new file with write access, then fputs 'hello
world' to it. the important thing to try would be the path. instead of
backslashing the path, use forward slashes:

c:/inetpub/wwwroot/test.txt

post the errors back here please. if there are none, we'll need to look at a
couple of other things more closely.


>> what should I have to check more ?
>
> Thank you

not a problem.

Re: failed to open stream: Permission denied

am 16.11.2007 19:21:58 von phpCodeHead

On Nov 15, 11:18 am, "Steve" wrote:
> "Darko" wrote in message
>
> news:295660f1-00b1-45ff-860b-afdd3070e855@41g2000hsh.googleg roups.com...
>
> > On Nov 15, 3:28 pm, "Andy2500" wrote:
> > Maybe you should try switching to Linux. Windows is not really a bless
> > for programming, you know.
> > I don't know this answer, but if you were on Linux, 1. I would know 2.
> > You wouldn't need it.
>
> so, because *you* know linux, the op won't have permissions issues? that
> would be entirely false. *i* know windows *and* that fact doesn't help the
> op in the least...unless i offer to share what i know.
>
> either way, windows programming is just as easily done as linux programming.
> the only main difference would be what libraries you're utilizing. and, as
> far as that goes, mfc is hard to beat. let me tell you, borland on windows
> ain't much different from borland on linux. :) for that matter, .net
> development on either os isn't much different either.
>
> cheers

**&&>>^^, %%$$__((*, @@!->OT, OT = HERE_01

.... just testing various start of off topic markers ...

carry on gentlemen...