Pacopag Posted April 20, 2011 Share Posted April 20, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/234291-images-failing-to-loadpermission-problem/ Share on other sites More sharing options...
Muddy_Funster Posted April 20, 2011 Share Posted April 20, 2011 it's not a permissions issue. try echo '<a href="http://<your_domain>/'.$filename.'">Check File Name</a>'; (where <you_domain> is actualy your domain) and then click the link to see what happens. Quote Link to comment https://forums.phpfreaks.com/topic/234291-images-failing-to-loadpermission-problem/#findComment-1204179 Share on other sites More sharing options...
Pacopag Posted April 21, 2011 Author Share Posted April 21, 2011 Hi. I tried what you said. When I click the link, it displays the image I want to see. Does this verify that it's not a permissions issue? Quote Link to comment https://forums.phpfreaks.com/topic/234291-images-failing-to-loadpermission-problem/#findComment-1204685 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.