michaellunsford Posted October 16, 2009 Share Posted October 16, 2009 this is weird, this php script worked great on my old server, but the new one reports "unable to open file" but conspicuously absent is the "permission denied" part. I've verified the path four times and made sure the directory has 777 permissions, I've even recursively set the 777 permissions about six times and verified via "ls -l" that they're wide open. I also temporarily turned off PHP safe mode and ran it a few more times without success. Finally, I provided "NULL" in imagejpeg()'s filename field and it dumped out the image (so we know there's one in there). I'm just stumped. Any other ideas? <?php //paths simplified for example $myrow['PHOTO1']="some_random_photo.jpg"; $im=imagecreatefromstring(file_get_contents("/".$myrow['PHOTO1'])); imagejpeg($im,"/thumbs/".$myrow['PHOTO1'],80); ?> Link to comment https://forums.phpfreaks.com/topic/177934-imagejpeg-unable-to-open-file-for-writing-in-indexphp/ Share on other sites More sharing options...
michaellunsford Posted October 16, 2009 Author Share Posted October 16, 2009 update - I ran it form the command line, and it works fine. So, maybe this is caused by something related to apache? Link to comment https://forums.phpfreaks.com/topic/177934-imagejpeg-unable-to-open-file-for-writing-in-indexphp/#findComment-938170 Share on other sites More sharing options...
michaellunsford Posted November 15, 2009 Author Share Posted November 15, 2009 bump - still stumped. Link to comment https://forums.phpfreaks.com/topic/177934-imagejpeg-unable-to-open-file-for-writing-in-indexphp/#findComment-958129 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.