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
Chat started on 12 Feb 2017, 02:56 PM (GMT+0)
(02:56:55) *** Ontical joined the chat ***
(02:56:55) Ontical: problem with php info
(02:56:57) Customer service: Thanks for your message, please wait a moment while our agents attend to you.
(02:57:57) Customer Service: We apologize for keeping you waiting. Our operators are busy right now, but somebody will be with you in a moment.
(03:15:24) *** Aljude joined the chat ***
(03:15:26) Aljude: Thank you for using One.com 24/7 Interactive Online Support. My name is Aljude.
(03:15:30) Aljude: Hello Ontical!
(03:15:34) Ontical: hello
(03:15:36) Aljude: What seems to be the issue?
(03:15:58) Ontical: please see this thread I opened in mybb community forums
(03:16:06) Ontical: https://community.mybb.com/thread-208226.html
(03:16:18) Ontical: I want to know if you can change the format of the numbers in php info
(03:16:55) Ontical: It is stopping me from uploading certain image files
(03:17:00) Ontical: 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).
(03:21:11) Ontical: Can you help me?
(03:26:01) Aljude: If you are referring to change the format of the memory limit, unfortunately that is not possible.
(03:26:12) Ontical: why not?
(03:26:30) Aljude: These are fixed and cannot be changed.
(03:26:44) Ontical: but it limits the functionality of my forum
(03:27:14) Ontical: if that is not possible, then how else can I solve the issue?
(03:27:24) Aljude: Unfortunately, there is nothing we can do about that.
(03:27:40) Ontical: I don't understand why they have to be fixed.
(03:28:36) Ontical: I mean, I am paying for the service believing it to be functional.
(03:29:57) Aljude: This is configured on the server and thus, it cannot be changed. Yes, you are paying for the services, however, what you wish to achieve cannot be done.
(03:30:36) Ontical: Is there a way to contact the people who use the server? If you are unable to , someone must be able to.
(03:31:07) Ontical: I'm pretty sure you can change it if you have access to it
(03:32:08) Ontical: Can I change anything in the .htaccess file?
(03:34:06) Ontical: It's right here, those who have access to server can change it https://premium.wpmudev.org/blog/increas...e.co.uk%2F
(03:34:29) Ontical: If you could give me some contact details for those who have access to the server, I would gladly talk to them myself.
(03:34:40) Aljude: Unfortunately, that is not possible.
(03:34:51) Ontical: I am dissapointed
(03:35:18) Aljude: Apologies, however, what you wish to achieve cannot be done on our end.
(03:36:16) Ontical: There have been a couple oftimes when this has become a problem for me, fair enough if the limit can't be increased above 96mb or 128 mb or whatever, but to alter the format is not asking for much
(03:36:52) Ontical: Can I write to your office?
(03:37:33) Aljude: You can send an email to [email protected]
(03:37:53) Ontical: ok, I will do that.
(03:39:13) Aljude: Alright
(03:39:15) Aljude: Feel free to contact us again should you need further assistance. Thank you and have a nice time! Smile
(03:39:16) Aljude: Bye
(03:39:22) *** Ontical has rated the chat Bad ***
Same sort of response the user in the other thread got by the sound of it.

The weird thing is that the value they have set is 512MB, but they'd put it in bytes, and like I say, I've never seen it set like this before except for this hosting company, typically it would be set as 512MB.

I debugged on the forum in the other thread, and when it tried to generate the attachment thumbnail, it hit a memory issue, and even though the debug stats were reporting 512MB, the PHP fatal error said it had run out of memory at only 2MB. It must be some weird issue with setting a memory limit in this way, I don't know why they don't just use the 512MB format.

Just for my own sanity, if you comment out the @ characters from that code, and try and upload a file with the default uploader, when you get a PHP fatal error, does it say that it exhausted the allowed memory of 2097152 bytes?
Matt, the genius of mybb, figured this out! Hereis the fix:

in ./inc/functions_image.php, line 167-169 is this:

function check_thumbnail_memory($width, $height, $type, $bitdepth, $channels)
{
 if(!function_exists("memory_get_usage"))

can you change this to:

function check_thumbnail_memory($width, $height, $type, $bitdepth, $channels)
{
 return false;
 if(!function_exists("memory_get_usage"))
Pages: 1 2