nextcloud / fulltextsearch

🔍 Core of the full-text search framework for Nextcloud
GNU Affero General Public License v3.0
212 stars 51 forks source link

Use of undefined constant JSON_PRESERVE_ZERO_FRACTION #276

Closed ymolinet closed 6 years ago

ymolinet commented 6 years ago

In NC13 log

Use of undefined constant JSON_PRESERVE_ZERO_FRACTION - assumed 'JSON_PRESERVE_ZERO_FRACTION' at /var/www/clients/client6/web146/web/apps/fulltextsearch_elasticsearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/SmartSerializer.php#31

and

json_encode() expects parameter 2 to be long, string given at /var/www/clients/client6/web146/web/apps/fulltextsearch_elasticsearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/SmartSerializer.php#31

ArtificialOwl commented 6 years ago

version of php ?

ymolinet commented 6 years ago

PHP 7.0.27-0+deb9u1 (cli) (built: Jan 5 2018 13:51:52) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.27-0+deb9u1, Copyright (c) 1999-2017, by Zend Technologies

ArtificialOwl commented 6 years ago

please check also the version of the php on command line:

$ php -v
ymolinet commented 6 years ago

This is the php -v output

ArtificialOwl commented 6 years ago

Documentation says that JSON_PRESERVE_ZERO_FRACTION is 'Available since PHP 5.6.6.'

Do you have more information on how you get this error ?

ymolinet commented 6 years ago

This server was previously under Jessie 8.8 and it was upgraded to stretch before the installation of nc13. Some previsous php5 packages was already present and it seems conflicting whith php7. I'm just clear the php5 packages and installed the correct php7 version. Wait and See.

ghost commented 6 years ago

I'm just clear the php5 packages and installed the correct php7 version.

Can you say how you did this? I'm having the same problem.

ymolinet commented 6 years ago

Just remove php5 package.

Dpkg -l «php5» Apt-get remove .... And install php7 package requiered...

Cordialement, Yannick Molinet Envoyé depuis mon mobile.


De: machina-speculatrix notifications@github.com Envoyé: mercredi 7 mars 2018 6:03 PM À: nextcloud/fulltextsearch Cc: Yannick MOLINET; Author Objet: Re: [nextcloud/fulltextsearch] Use of undefined constant JSON_PRESERVE_ZERO_FRACTION (#276)

I'm just clear the php5 packages and installed the correct php7 version.

Can you say how you did this? I'm having the same problem.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/nextcloud/fulltextsearch/issues/276#issuecomment-371208219, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADSbFMYv5oOLJZauzcL8OZ7MbGU4czp0ks5tcBL2gaJpZM4SIPhb.

ettingerkarl commented 5 years ago

After updating to nextcloud 15.0.0

Docker: wonderfall Nextcloud: 15.0.0.10 PHP: 7.2.2 Nginx Full text search: 1.2.3 Full text search - Elasticsearch Platform: 1.2.2 Full text search - Files: 1.2.3

[cron] Error: TypeError: json_decode() expects parameter 1 to be string, null given at <>

  1. /apps2/fulltextsearch/lib/Db/IndexesRequestBuilder.php line 125 json_decode(null, true)
  2. /apps2/fulltextsearch/lib/Db/IndexesRequest.php line 305 parseIndexesSelectSql({owner_id: "etti ... "})
  3. /apps2/fulltextsearch/lib/Service/IndexService.php line 598 getQueuedIndexes(false)
  4. /apps2/fulltextsearch/lib/Cron/Index.php line 118 getQueuedIndexes(false)
  5. /apps2/fulltextsearch/lib/Cron/Index.php line 100 liveCycle()
  6. /nextcloud/lib/private/BackgroundJob/Job.php line 61 run(null)
  7. /nextcloud/lib/private/BackgroundJob/TimedJob.php line 55 execute(OC\BackgroundJob\JobList {}, OC\Log {})
  8. /nextcloud/cron.php line 123 execute(OC\BackgroundJob\JobList {}, OC\Log {})

at 2018-12-31T10:05:00+01:00

Arjenlodder commented 5 years ago

Same problem here

k1l1 commented 5 years ago

I have the same behavior