File Manager, Tutorial

Unexpected token in JSON at position 0

1 min read
json responsive file manager

Unexpected token < in JSON at position 0. Error ini saya dapati ketika memindahkan direktori Responsive File Manager ke Komputer lain dengan versi PHP yang lebih baru.

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

Berikut adalah tutorial yang saya temukan dan dapat memberikan solusi.

Mengganti baris kode  496 dan 1431 dari file UploadHandler.php dengan kode berikut:

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

Terkadang, dalam versi yang lebih baru baris kodenya tidak tentu sama. Coba search dengan kata kunci $uploaded_bytes untuk menemukan baris kode tersebut. Setelah selesai mengganti, save dan coba refresh halaman Responsive File Manager. Seharusnya error Unexpected token < in JSON at position 0 sudah tidak muncul kembali. 


Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

Related Posts

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.


Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

Related Posts

Chat!
1