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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need some help understanding Error messages???

Status
Not open for further replies.

imryn

Programmer
Dec 2, 2002
75
US
Hello everyone,

I was wondering if anyone could help me understand these Error messages better.

Warning: file_get_content(dsc_0003.jpg)[function.file-get-contents]: failed to open stream: No such file or directory in ....

Warning: file(dsc_0003.jpg)[function.file]: failed to open stream: No such file or directory in ....

Warning: fopen(dsc_0003.jpg)[function.fopen]: failed to open stream: No such file or directory in ....

Warning: Wrong parameter count for fread() in ....

I did a chmod 777 on the directory, and I know for sure the images are there, plus all but the images is being loaded to the database.... Any thoughts

imryn
 
What folder are the images in? And what folder are you specifying when you try to read them?

Lee
 
These may be silly comments, but just covering the bases:

1) Make sure your "dsc_0003.jpg" file's name is all lowercase just like your code is expecting (it sounds like a filename from a camera, and often cameras save as uppercase). Also make sure there aren't any other hidden differences, like a space at the beginning or end.

2) To make sure the path isn't the problem, try referencing the file relative to the directory the PHP file is in. If for example, your PHP file is in your "html" directory, just reference "images/dsc_0003.jpg". I know that you may want absolute addressing in the long term, but try relative addressing just for a test.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top