truegilly Posted August 8, 2007 Share Posted August 8, 2007 Hi guys got a very annoying problem that i have now been trying to fix for days !! :'( i have a image upload page that ive been assigned to fix, due to it apparently never working. I have a sneaky suspision that the storage directory for the images has not been set the required permissions. The main problem is that the server we are running the site on does not allow us access to the php.ini. The error (the one ive been trying to solve for days ) is this.. # Upload to server if(imagejpeg($thumb,'/home/httpd/vhosts/clearblueseas.com/httpdocs/clearblueseas_admin/inc/img/temp/'.$_FILES['upload_pic']['name'] ,80)): return TRUE; else: return FALSE; endif; Warning: imagejpeg(): Unable to open '/home/httpd/vhosts/clearblueseas.com/httpdocs/clearblueseas_admin/inc/img/temp/dogs.jpg' for writing in /home/httpd/vhosts/clearblueseas.com/httpdocs/clearblueseas_admin/inc/functions.php on line 46 To check weather this directory is writable i used the is_writable() function which always returns false. my question is... 1. Can anyone give any advice on this partucilar issue ?? ??? 2. I have been reading about the ini_ set() and other similar functions that allow changes to be made to the php.ini. Can anyone suggest which setting i need to change ?? ??? many thanks Truegilly Quote Link to comment https://forums.phpfreaks.com/topic/63884-image-uploads-problems-imagejpeg-unable-to-open/ Share on other sites More sharing options...
frost Posted August 8, 2007 Share Posted August 8, 2007 Is the storage directory CHMOD'ed properly? You can change the CHMOD with an ftp program and you don't need to touch the php.ini file. Quote Link to comment https://forums.phpfreaks.com/topic/63884-image-uploads-problems-imagejpeg-unable-to-open/#findComment-318666 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.