Hi all, I've got two web forms that handle photo uploads. In one directory ... getimagesize() works fine, in the other... it doesn't: Directory that it works.
/php/webForm1.html (has action to /php/submitForm.php) /php/submitForm.php Directory that doesn't work. /otherDir/webForm2.html (has action to /php/submitForm.php) //same as above. the submitForm.php is the script that processes both webForms found in different directory's. Everything else on the form from /otherDir/webForm2.html can be echo'd out fine. excerpt from submitForm.php script: if ($Photo) { $photoSize=GetImageSize($Photo); if ($photoSize[2]=="1") { $photofinal="$uniqueID"."_1".".gif"; rename (lPhoto,$photofinal); } elseif ($photoSize[2]=="2") { $photofinal="$uniqueID"."_1".".jpg"; rename ($Photo,$photofinal); //WORKS HERE WITH 1ST EX. } elseif ($photoSize[2]=="3") { $photofinal="$uniqueID"."_1".".png"; rename (lPhoto,$photofinal); } else { echo "<p> <p>"; echo "<strong>Your photo must be in .gif, .jpg or .png format only.</strong><p>"; echo "<a href=\"javascript:history.back()\">Back</a>"; exit; //THIS IS WHERE IT'S EXITING EVEN THOUGH THE PHOTO IS TYPE .jpg IN BOTH TEST CASES. } } //End if Photo. submitForm.php has 775 permissions. I think it has to do with the fact that the file is uploaded to forms in the two different dir's. But why would one work and the other not? Any ideas?? Thanks in advance.