Error when upload file media and Library view page

Hi Team,

I’ve an error when I upload all media (picture, movie, etc…)

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

And I get an error when I load Livrary (media) page : http://srv-lx1/library/view

DataTables warning: table id=libraryItems - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1

I use XIBO CMS Web (not Docker) 1.8.9
Install OK to Debian 9 (stretch) - Apache 2.4.25 - PHP 5.6.35
All PHP settings → OK
All php dependency → OK

My virtual host :

ServerName srv-lx1
DocumentRoot /var/www/xibo/web

<Directory /var/www/xibo/web>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted

Rewrite mod enable in Apache

RewriteEngine On

Loaded Modules :
core mod_so mod_watchdog http_core mod_log_config mod_logio mod_version mod_unixd mod_access_compat mod_alias mod_auth_basic mod_authn_core mod_authn_file mod_authz_core mod_authz_host mod_authz_user mod_autoindex mod_deflate mod_dir mod_env mod_filter mod_mime prefork mod_negotiation mod_php5 mod_reqtimeout mod_rewrite mod_setenvif mod_status

Apache Environment :

HTTP_HOST srv-lx1
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 10.0; WOW64; rv:59.0) Gecko/20100101 Firefox/59.0
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
HTTP_ACCEPT_LANGUAGE fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_COOKIE PHPSESSID=g9dtuqo56du5u91589rtnpssk6
HTTP_CONNECTION keep-alive
HTTP_UPGRADE_INSECURE_REQUESTS 1
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SERVER_SIGNATURE Apache/2.4.25 (Debian) Server at srv-lx1 Port 80
SERVER_SOFTWARE Apache/2.4.25 (Debian)
SERVER_NAME srv-lx1
SERVER_ADDR 192.168.251.112
SERVER_PORT 80
REMOTE_ADDR 192.168.251.105
DOCUMENT_ROOT /var/www/xibo/web
REQUEST_SCHEME http
CONTEXT_PREFIX no value
CONTEXT_DOCUMENT_ROOT /var/www/xibo/web
SERVER_ADMIN webmaster@localhost
SCRIPT_FILENAME /var/www/xibo/web/info.php
REMOTE_PORT 54834
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value

I’ve tested with KeepAlive On and Off

Have you an idea ?

It could be a problem in the php.ini How do I upload files bigger than 2MB / How can I increase the upload file size limit?
Could you please confirm that those settings are correct in your environment?

What’s your CMS library path in CMS settings?

PHP.ini configuration :

upload_max_filesize = 128M
post_max_size = 128M
memory_limit = 128M
max_execution_time = 500
max_input_time = 300

Path Library in CMS setting :

/var/www/xibo/web/library/

Could you perhaps open Firefox/Chrome dev console and look at the XHR requests, presumably you will see an error there, could you tell us what does it say?

CMS log page might have some additional information as well related to this problem.

I don’t have a log info in CMS

And to upload file media :

En-têtes de la réponse (259 o)
Connection Keep-Alive
Content-Length 304
Content-Type text/html; charset=iso-8859-1
Date Wed, 02 May 2018 10:21:54 GMT
Keep-Alive timeout=5, max=99
Location srv-lx1/library/
Server Apache/2.4.25 (Debian)

En-têtes de la requête (578 o)
Accept application/json, text/javascript, /; q=0.01
Accept-Encoding gzip, deflate
Accept-Language fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Connection keep-alive
Content-Length 7803
Content-Type multipart/form-data; boundary=…--------------103911127531589
Cookie PHPSESSID=t7994ihlvc1huoaocqtm6upb17
Host srv-lx1
Referer srv-lx1/library/view
User-Agent Mozilla/5.0 (Windows NT 10.0; …) Gecko/20100101 Firefox/59.0
X-Requested-With XMLHttpRequest
X-XSRF-TOKEN cf6c813d9a45aa66c68842ff957cdee36fda035b

I’ve deleted Xibo folder and database.
Re-installation CMS but same result.

Nobody have an idea ?

Hello Leboubou111, you have been able to solve the problem. I’m encountering the same problem after updating

Hi Daniel,
Hummm, no i’ve lost a lot of time for any result.
Try to upgrade your PHP version… Juste an idea.