Jump to content

Filename cannot be empty in Error


esport

Recommended Posts

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

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]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.