truegilly Posted August 8, 2007 Share Posted August 8, 2007 Hi guys, a real quick one...... can anyone tell me what i need to change in the php.ini file to make a directory on the server writeble so i can upload a file ? ??? many thanks Truegilly Quote Link to comment https://forums.phpfreaks.com/topic/63901-changeing-a-directory-on-the-server-to-be-writable/ Share on other sites More sharing options...
trq Posted August 8, 2007 Share Posted August 8, 2007 There is no such setting in the php.ini. What exactly is your problem? Quote Link to comment https://forums.phpfreaks.com/topic/63901-changeing-a-directory-on-the-server-to-be-writable/#findComment-318494 Share on other sites More sharing options...
wildteen88 Posted August 8, 2007 Share Posted August 8, 2007 To make a folder writeable you don't edit the php.ini instead you have to change the CHMOD permissions on the specified folder. You can do this within your script using the chmod function (temporary permissions) or you can use an FTP client (permanent permissions). You only need to use chmod on *nix based OS's. Windows does not use chmod for file permissions. Quote Link to comment https://forums.phpfreaks.com/topic/63901-changeing-a-directory-on-the-server-to-be-writable/#findComment-318506 Share on other sites More sharing options...
truegilly Posted August 8, 2007 Author Share Posted August 8, 2007 ok, thanks for that, my problem is that the directory that will store my images once they are uploaded constantly states that its not writable. Ive used the is_writable() function to check this. <?php if (is_writable("/home/httpd/vhosts/clearblueseas.com/httpdocs/clearblueseas_admin/inc/img/temp")) { echo "is_writable"; } else { echo "not writable"; } ?> The problem i have is that i keep getting the following error when i try and put uploaded images into the directory. the image i have uploaded is dogs.jpg 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 44. i have uploaded another post previous to this that states the issue in more detail - http://www.phpfreaks.com/forums/index.php/topic,153744.0.html any help is much appriciated !!! truegilly Quote Link to comment https://forums.phpfreaks.com/topic/63901-changeing-a-directory-on-the-server-to-be-writable/#findComment-318510 Share on other sites More sharing options...
truegilly Posted August 8, 2007 Author Share Posted August 8, 2007 yeah thanks for that but i forgot to mention that ive tried that and this is what i got back.... <?php Warning: chmod(): Operation not permitted in /home/httpd/vhosts/clearblueseas.com/httpdocs/clearblueseas_admin/inc/property/photos.php on line 17 // Everything for owner, read and execute for others chmod("/home/httpd/vhosts/clearblueseas.com/httpdocs/clearblueseas_admin/inc/img/temp/", 0777); ?> once again many thanks for the help !! Truegilly Quote Link to comment https://forums.phpfreaks.com/topic/63901-changeing-a-directory-on-the-server-to-be-writable/#findComment-318516 Share on other sites More sharing options...
wildteen88 Posted August 8, 2007 Share Posted August 8, 2007 Can you can change permissions via FTP? Login to your FTP client and right click the folder you wish to change permissions if you cannot change via FTP then it looks like you host has disabled file permissions. Quote Link to comment https://forums.phpfreaks.com/topic/63901-changeing-a-directory-on-the-server-to-be-writable/#findComment-318521 Share on other sites More sharing options...
truegilly Posted August 8, 2007 Author Share Posted August 8, 2007 thank you very much !! just had a go at changing the folder permissions with fireFTP that we use here but it doesnt have a right click option for changing permissions, so im gonna search the web for an alternative, do you know any good ones your can reccomend ?? as soon is ive got one ill give it a go and post the results truegilly Quote Link to comment https://forums.phpfreaks.com/topic/63901-changeing-a-directory-on-the-server-to-be-writable/#findComment-318527 Share on other sites More sharing options...
truegilly Posted August 8, 2007 Author Share Posted August 8, 2007 Hi guys, just downloaded core FTP, so far a nice piece of software. anyways have viewed the permissions on the /home/httpd/vhosts/clearblueseas.com/httpdocs/clearblueseas_admin/inc/img/temp folder and this is what it says.... USER Read Y Write Y Execute Y GROUP Read Y Write X Execute Y WORLD Read Y Write X Execute Y value = 755 File Permissions: drwxr-xr-x many thanks Truegilly Quote Link to comment https://forums.phpfreaks.com/topic/63901-changeing-a-directory-on-the-server-to-be-writable/#findComment-318533 Share on other sites More sharing options...
truegilly Posted August 8, 2007 Author Share Posted August 8, 2007 right ive changed the file permissions so its 777. trouble is im still getting that error. one thing i havent mentioned is that on the server there are .htaccess all over the place, ive looked in the one on the root but it doesnt seem to influence anything from the upload directory. The .htaccess file that is in the parent directory two up from temp contains nothing of any signifcance. has anyone had the same problem ?? thanks truegilly :'( Quote Link to comment https://forums.phpfreaks.com/topic/63901-changeing-a-directory-on-the-server-to-be-writable/#findComment-318543 Share on other sites More sharing options...
truegilly Posted August 9, 2007 Author Share Posted August 9, 2007 !! bump !! Quote Link to comment https://forums.phpfreaks.com/topic/63901-changeing-a-directory-on-the-server-to-be-writable/#findComment-319183 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.