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.

 

Link to comment
Share on other sites

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.