TinyMCE: Internal Server Error when uploading a new image Topic is solved

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
WDJames
Forum Members
Forum Members
Posts: 81
Joined: Tue Feb 13, 2018 1:09 pm

TinyMCE: Internal Server Error when uploading a new image

Post by WDJames »

Hi All,

We're having a weird one with TinyMCE. We are getting an Internal Server Error message when uploading an image via the Responsive File Manager on TinyMCE. The odd thing is that the image IS being uploaded to the correct folder but does not appear on the Responsive File Manager (the file is included on the files/folder count) on TinyMCE. I found out that it is not appearing because the file is not being copied into the "/tmp/thumbs/images" folder. The site is using the latest version of CMSMS (2.2.21) and TinyMCE (3.3.2) and is using php 7.4.

Anyone else having/had the same issue?

Thanks,

James
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1791
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: TinyMCE: Internal Server Error when uploading a new image

Post by DIGI3 »

If you're using the sample htaccess file that ships with cmsms, there's a line you need to comment out/remove/edit as per the TinyMCE module help. If that's not it, check your php error logs to see what the actual error is.
Not getting the answer you need? CMSMS support options
WDJames
Forum Members
Forum Members
Posts: 81
Joined: Tue Feb 13, 2018 1:09 pm

Re: TinyMCE: Internal Server Error when uploading a new image

Post by WDJames »

I've tried that but the issue persists. Also, the error_log isn't being updated. For now, I'm manually copying the uploaded image to the "/tmp/thumbs/images" folder which sorts the issue but is rather annoying to have to do that. I've tested on other CMSMS installs on a separate server and can confirm that the issue is not present. Any ideas?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1791
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: TinyMCE: Internal Server Error when uploading a new image

Post by DIGI3 »

Without the error message it's hard to say, but it could be php memory, or a missing PHP module needed for creating the thumbnail. Check the admin log as well, and then compare the PHP plugins and settings to a site where it's working.
Not getting the answer you need? CMSMS support options
WDJames
Forum Members
Forum Members
Posts: 81
Joined: Tue Feb 13, 2018 1:09 pm

Re: TinyMCE: Internal Server Error when uploading a new image

Post by WDJames »

I've compared the php plugins and settings but found that there are more disabled php plugins on the site where its working. Also, the closest thing I have to an error message is (when I enable display_errors on the PHP INI settings):

SyntaxError: Unexpected token '<', "<br />
<b>
... is not valid JSON

The funny thing is that thumbnails are created when I use the default File Manager module. It looks like the error is more to do with the image not being copied to the "/tmp/thumb/images" folder on upload as I just copied an image to that directory (without the thumbnail file) and was able to see the image.
WDJames
Forum Members
Forum Members
Posts: 81
Joined: Tue Feb 13, 2018 1:09 pm

Re: TinyMCE: Internal Server Error when uploading a new image

Post by WDJames »

Found the error log:

[04-Dec-2024 16:35:26 Europe/London] PHP Fatal error: Uncaught Error: Call to undefined function mime_content_type() in /modules/TinyMCE/responsive_filemanager/filemanager/include/php_image_magician.php:2723
Stack trace:
#0 /home/account/website.co.uk/modules/TinyMCE/responsive_filemanager/filemanager/include/php_image_magician.php(230): imageLib->openImage('../../../../upl...')
#1 /home/account/website.co.uk/modules/TinyMCE/responsive_filemanager/filemanager/include/utils.php(425): imageLib->__construct('../../../../upl...')
#2 /home/account/website.co.uk/modules/TinyMCE/responsive_filemanager/filemanager/UploadHandler.php(1491): create_img('../../../../upl...', '../../../../tmp...', 122, 91)
#3 /home/account/website.co.uk/modules/TinyMCE/responsive_filemanager/filemanager/UploadHandler.php(1440): UploadHandler->onUploadEnd(Array)
#4 /home/account/website.co.uk/modules/TinyMCE/responsive_filemanager/filemanager/UploadHandler.php(213): UploadHandler->post(false)
#5 /home/account/website. in /home/account/website.co.uk/modules/TinyMCE/responsive_filemanager/filemanager/include/php_image_magician.php on line 2723
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1791
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: TinyMCE: Internal Server Error when uploading a new image

Post by DIGI3 »

I think that's the fileinfo (finfo) extension for PHP.
Not getting the answer you need? CMSMS support options
WDJames
Forum Members
Forum Members
Posts: 81
Joined: Tue Feb 13, 2018 1:09 pm

Re: TinyMCE: Internal Server Error when uploading a new image

Post by WDJames »

Yup, I've installed it on the server which sorted the issue. Thanks for the help.
Post Reply

Return to “Modules/Add-Ons”