esport Posted October 13, 2009 Share Posted October 13, 2009 Hi Guys, I have an image upload script that was working fine on one server and now is producing errors on another. The function that I am using is: getimagesize() and is producing the error message: Filename cannot be empty in Now the php version is 4.4 GD library is installed and enabled. Not sure what causes this error. I echoed $_FILES['file']['tmp_name'] so I know there is something being passed to the function. ?? Any ideas. I have done a little research on the forums and net but cant find an answer. Cheers d Link to comment https://forums.phpfreaks.com/topic/177509-filename-cannot-be-empty-in-error/ Share on other sites More sharing options...
trq Posted October 13, 2009 Share Posted October 13, 2009 Can you post the relevant code? Link to comment https://forums.phpfreaks.com/topic/177509-filename-cannot-be-empty-in-error/#findComment-935921 Share on other sites More sharing options...
esport Posted October 13, 2009 Author Share Posted October 13, 2009 Here is the code that calls the image upload class and attached is the image class file $upload_class = new Upload_image; $upload_class->temp_file_name =$_FILES['photo']['tmp_name']; $upload_class->file_name = $photo_name; $upload_class->upload_dir = $image_url; $upload_class->max_file_size = 100000; $upload_class->max_width = $widthArray[$i]; $upload_class->max_height = $heightArray[$i]; $upload_class->extension_array = array('jpg','jpeg','jpe'); $check_ext = $upload_class->validate_extension(); $check_size = $upload_class->validate_image_size(); $i++; $upload_class->upload_image(); [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/177509-filename-cannot-be-empty-in-error/#findComment-935926 Share on other sites More sharing options...
esport Posted October 14, 2009 Author Share Posted October 14, 2009 Does anyone have any ideas? I have no idea why this error is being produced? What causes this error. Its passing the file across. Link to comment https://forums.phpfreaks.com/topic/177509-filename-cannot-be-empty-in-error/#findComment-936489 Share on other sites More sharing options...
cags Posted October 14, 2009 Share Posted October 14, 2009 What happens if you do this... // place these two echo's echo $_FILES['file']['tmp_name'] . '<br/>'; echo $upload_class->temp_file_name; // before this line $check_size = $upload_class->validate_image_size(); Link to comment https://forums.phpfreaks.com/topic/177509-filename-cannot-be-empty-in-error/#findComment-936642 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.