Jump to content

images failing to load...permission problem?


Pacopag

Recommended Posts

Hi.  I'm using SimpleImage.php to do some basic image manipulation.  The code is here http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php, but I don't think all the details are important.  Basically, I'm trying to read and image and save it with a different name.  I'm really new with this stuff, so it's probably something simple.

 

Anyway, here is the code throwing the error,

 

$image_info = getimagesize($filename);

 

where $filename is a string containing the path to the image I want to load, e.g. $filename="images/picture.jpg";  It's throwing a "Read Error!"

I know that the path is correct.  In fact I first check if the file is there using is_file($filename); and it returns true.  I'm guessing that maybe php does not have "permission" to read this file.  The permissions for the file are

-rw-r--r-- 1 www-data www-data 80211 2011-04-20 16:19 picture.jpg

 

Looks like everyone has "read" permission, so I don't see what the problem is.  Also, the permissions of the folder and all parent folders are 777.  Not sure what the problem is.  I might be way off by guessing that it is a permissions problem.

 

Any help would be great.  Thanks.

 

Also, I was wondering if there is a way for this forum to email me whenever there is a reply to my posts.  I can't seem to find the option anywhere.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.