MyBB Community Forums

Full Version: Upload attachments returns 'undefined'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
[attachment=38352]

Whenever I try to upload a jpeg, or png file, I get this message above my new mutiple upload attachment plugin. I disabled the plugin and used the standard mybb upload attachment system and it still would not upload the file, the screen goes white. The file sizes were well within the limit too.

Any clue as to what I can modify here? I'm worried because there are few things on my forum that don't function that well anymore and that I may have to reupload the forum and start again at this point.

Test account:

Test
testing123

EDIT: Actually, some jpg files will upload, but not the ones I have just created with snagit (a screen capture file)
What's your PHP memory limit and max_post_size set to?
I don't have access to those variables, they are in .ini files on the server that my host has access to and they will not alter them, I believe they are set to 96MB, but the files I tried to upload were around 14MB. I uploaded an MP4 that was around 40MB and a gif that was 12MB earlier. It seems the scale may have something to do with it, if I make smaller screen selections, I don't have a problem. I have tried to rescale the files and they still would not upload.

[attachment=38353]
This is the file I am trying to upload, it has worked here, but I can't on my forum.
You'll have access to them in the PHP Info section of the Tools & Maintenance module, unless that's been disabled. If you can find these values there it will help know what the issue is.
[attachment=38354]

I get this when I access that area.
Yeah, so in there, if you can find the value for memory_limit, post_max_size and upload_max_filesize, that would be helpful... you'll probably find that if you use the default MyBB uploader, and edit ./inc/functions_image.php to remove the @ symbol used on lines 52 and 59, that you'll get a memory limit error when you try and upload.
memory_limit 536870912 536870912
post_max_size 96M 96M

So just to get this straight, I need to check if there is an @ symbol or do Ihave to add one to those lines?

	if(@function_exists("imagecreatefrompng"))
			{
				$im = @imagecreatefrompng($file);
			}
		}
		elseif($imgtype == 2)
		{
			if(@function_exists("imagecreatefromjpeg"))
			{
				$im = @imagecreatefromjpeg($file);
			}
		}
		elseif($imgtype == 1)

So I checked those lines and see @ symbols.
Okay, your issue is the same issue the last person with this problem had, they had the memory limit in this format too instead of a more conventional format like 128M (like your max_post_size is). Who's your host?

If you remove the @ symbols temporarily, it'll stop suppressing the errors, and instead of a blank page you'll get a PHP memory limit error message.
Right okay, I understand what you mean by the @ symbol removal. I will make a copy of the file.

My host is one.com

Should I ask them to change the format of the file limit digits?
Hah, exact same host as the last person. They ended up having to change hosts because they refused to accept it was anything to do with them.

https://community.mybb.com/thread-207235.html

This is the only host I've seen set the memory limit in this way, and it clearly doesn't work.
Pages: 1 2