File Manager, Tutorial

Unexpected token in JSON at position 0

1 min read

Unexpected token < in JSON at position 0.
I got this error when moving the Responsive File Manager directory to another computer with a newer PHP version.

screencapture-rails-stage-new-vdare-admin-publications-new-2018-04-30-12_02_53

Here’s a tutorial I found that may provide a solution.

Replace lines 496 and 1431 of the UploadHandler.php file with the following code :

$uploaded_bytes = $this->fix_integer_overflow((int)(isset($content_range[1]) ? $content_range[1]: 1));

Sometimes, in newer versions the code line is not necessarily the same.
Try searching with keywords $uploaded_bytes to find that line of code.
When you’re done changing it, save and try refreshing the Responsive File Manager page.
The error Unexpected token < in JSON at position 0 should no longer appear.


Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

× Chat