The Problem
We've recently started getting an error when trying to upload images in the WYSIWYG editor. Unfortunately the errors on our development and production servers are different.
The error on the production server (and the one that clued us in that there was a problem) is: SyntaxError: Unexpected end of input
The error on the development server is: SyntaxError: invalid property id
What I've Tried
I downloaded the latest version from the website, and tried both updating and doing a clean install on our development server. That didn't fix anything.
Note: Before the error showed up, I hadn't made any changes to the software, and our server admin said he hadn't made any changes to the server.
Any help in figuring out what's going on is very much appreciated. We upload a lot of images, so this has put a real kink in our workflow.
Thanks!
Image Upload Suddenly Stopped Working
Moderator: Thorsten
Re: Image Upload Suddenly Stopped Working
Hi,
which browser do you use? Can I check it on your FAQ?
bye
Thorsten
which browser do you use? Can I check it on your FAQ?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Image Upload Suddenly Stopped Working
Now that you've asked about browsers...
In Chrome, the error I get is: SyntaxError: Unexpected end of input
In Firefox, the error I get is: SyntaxError: invalid property id
In IE 11, the error I get is: TypeError: Permission denied
Unfortunately, I don't think there's a way I can have you check it on our installation. We use the API for our client-side stuff, so the site is configured to specifically prevent people outside our IP from viewing it.
In Chrome, the error I get is: SyntaxError: Unexpected end of input
In Firefox, the error I get is: SyntaxError: invalid property id
In IE 11, the error I get is: TypeError: Permission denied
Unfortunately, I don't think there's a way I can have you check it on our installation. We use the API for our client-side stuff, so the site is configured to specifically prevent people outside our IP from viewing it.
Re: Image Upload Suddenly Stopped Working
Hi,
okay, I'll try to reproduce it.
bye
Thorsten
okay, I'll try to reproduce it.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Image Upload Suddenly Stopped Working
Hi,
is it possible to get access to your FAQ? Sadly I cannot reproduce your issue on my test systems with latest Chrome, latest Firefox and IE11.
bye
Thorsten
is it possible to get access to your FAQ? Sadly I cannot reproduce your issue on my test systems with latest Chrome, latest Firefox and IE11.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Image Upload Suddenly Stopped Working
Unfortunately, I don't think so because of how we have things set up.is it possible to get access to your FAQ?
However!
I have managed to whittle things down considerably. The file upload works if I comment out the following:
Code: Select all
// Check on MIME type to avoid upload of malicious PHP files
$phpMimeTypes = array(
'text/php',
'text/x-php',
'application/php',
'application/x-php',
'application/x-httpd-php',
'application/x-httpd-php-source'
);
$finfo = finfo_open(FILEINFO_MIME_TYPE);
if (in_array(finfo_file($finfo, $this->_value['tmp_name']), $phpMimeTypes)) {
return false;
}
Hopefully that sheds some light on things for you.
Re: Image Upload Suddenly Stopped Working
Hi,
this code prevents uploading PHP files. Please enable the debug mode in inc/Bootstrap.php, re-add the code you removed and try it again to see some errors.
bye
Thorsten
this code prevents uploading PHP files. Please enable the debug mode in inc/Bootstrap.php, re-add the code you removed and try it again to see some errors.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Image Upload Suddenly Stopped Working
When I click on the "browse" button next to the URL field, I get this twice at the top of the new window:
If I attempt to upload an image, I get the JavaScript error I reported previously, but no new errors.
Code: Select all
[8]: getimagesize(): Read error! in [faq root directory]\admin\editor\plugins\ajaxfilemanager\inc\class.file.php on line 45
Re: Image Upload Suddenly Stopped Working
Hi,
okay, I do a deeper investigation.
bye
Thorsten
okay, I do a deeper investigation.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist