Connecting Tech Pros Worldwide Forums | Help | Site Map

Guide for this error..

skyimai@gmail.com
Guest
 
Posts: n/a
#1: Nov 12 '07
Hi guice,


I have designed a php search page..When I entered the search term

it shows me the follwing error..

Warning: fopen(files/admin.jpg) [function.fopen]: failed to open
stream: Permission denied in C:\Inetpub\vhosts\iswaryammatrimony.com
\httpdocs\search result.php on line 206
file error


Somebody told me that the file must be allowed to read by server
administrator..
Pls Guide me..Thanks in advance..

Imai from Sky
www.adobians.com


Erwin Moller
Guest
 
Posts: n/a
#2: Nov 12 '07

re: Guide for this error..


skyimai@gmail.com wrote:
Quote:
Hi guice,
>
>
I have designed a php search page..When I entered the search term
>
it shows me the follwing error..
>
Warning: fopen(files/admin.jpg) [function.fopen]: failed to open
stream: Permission denied in C:\Inetpub\vhosts\iswaryammatrimony.com
\httpdocs\search result.php on line 206
file error
>
>
Somebody told me that the file must be allowed to read by server
administrator..
That was good advice.
PHP cannot open a file because the user that runs PHP doesn't have the
right permissions on that file.

Solution?
1) Find out who runs as PHP
- probably IUSR_<machinenameon IIS/Windows.
- probably nobody, or apache, or www-data on Apache/*nix

2) Give read and/or write permission for this user on the file in question.

Regards,
Erwin Moller
Quote:
Pls Guide me..Thanks in advance..
>
Imai from Sky
www.adobians.com
>
Steve
Guest
 
Posts: n/a
#3: Nov 12 '07

re: Guide for this error..



<skyimai@gmail.comwrote in message
news:1194875209.784309.135970@t8g2000prg.googlegro ups.com...
Quote:
Hi guice,
>
>
I have designed a php search page..When I entered the search term
>
it shows me the follwing error..
>
Warning: fopen(files/admin.jpg) [function.fopen]: failed to open
stream: Permission denied in C:\Inetpub\vhosts\iswaryammatrimony.com
\httpdocs\search result.php on line 206
file error
>
>
Somebody told me that the file must be allowed to read by server
administrator..
Pls Guide me..Thanks in advance..
the error is clear. you need to set permissions on your
vhosts\iswaryammatrimony.com\httpdocs\ directory such that apache has at
least read permissions. i assume you're running apache here. if iis, you
need to set that directory up as a virtual web server. google how to do
either.

on another note, you need to watch your nomanclature. though php will handle
backslashed paths, it is easier to write them without error using forward
slashes...i.e. c:/inetput/vhosts/

also, more problems will arise for not only you, but your end users if you
place spaces in your script names, i.e. 'search result.php'. bad, bad, bad
idea. i won't get into that much more here other than to state it as such -
a bad idea.


skyimai@gmail.com
Guest
 
Posts: n/a
#4: Nov 12 '07

re: Guide for this error..


Sir,

I m using Apache web server..with plesk control panell.. I have
checked the preference..all are checked to read and also write too.
Thanks ...

Steve
Guest
 
Posts: n/a
#5: Nov 12 '07

re: Guide for this error..



<skyimai@gmail.comwrote in message
news:1194885485.393904.289970@z24g2000prh.googlegr oups.com...
Quote:
Sir,
>
I m using Apache web server..with plesk control panell.. I have
checked the preference..all are checked to read and also write too.
Thanks ...

it's NOTHING to do with plesk or anything else. you have to tell your
*operating system* that it is ok for *apache* to access the directory.


Closed Thread