I am facing uploading problem in php script. I have two users: 1. joseph 2. joe Both users have the same privileges and can upload the images. The problem I am facing is, that user "joseph" can upload the images while "joe" can not. I have gone through the script line by line and have echo(d) the results line by line for both users and have seen that the problem occurs at the rename($path_to_image, $uploaded_pic) Code (markup): function. For "joseph" the file/dir is renamed but for "joe" it does not. Again I say that both the users are registered users and have the same privileges. Can someone please help me? Here is the code: // Create path for final location. $uploaded_pic = $dest_dir . $picture_name; // Form path to temporary image. $path_to_image = './'.$CONFIG['fullpath'].'edit/'.$file_set[1]; // prevent moving the edit directory... if (is_dir($path_to_image)) cpg_die(CRITICAL_ERROR, $lang_upload_php['failure'] . " - '$path_to_image'", __FILE__, __LINE__, true); echo "path to imnage: ".$path_to_image; echo "uploaded pic: ".$uploaded_pic; echo "entreing rename function"; /* same results are echo(ed) for both user till here. But below this only "joseph" can enter successfully, not "joe"*/ //Move the picture into its final location if (rename($path_to_image, $uploaded_pic)) { echo "in rename"; exit; Code (markup): Thanks Joseph Bashir Ufnasoft http://ufnasoft.com
I posted this problem today morning but still there is no reply from someone. Here is some more about the problem. I am using Coppermine Photo Gallery (a php module) http://coppermine-gallery.net/ for uploading and managing images. The problem is occuring in upload.php file. If someone has used this module and can take some time to look into the problem. Your help will be much appreciated. Thanks Joseph Bashir