Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi

SUJET : Undefined function json_decode

Undefined function json_decode il y a 2 ans 4 mois #78582

  • omar
  • Portrait de omar
  • Hors ligne
  • Fresh Lemon
  • Messages : 1
  • Karma: 0
I just downloaded version 2 went through the install steps; at the end of the installation I clicked on the 'Administration' button and got a blank page.

I have PHP 5.1.6 and MySQL 5.0.77 and the mbstring extension.

Found this in the web server error log:
PHP Fatal error: Call to undefined function json_decode() in .../limesurvey/application/helpers/common_helper.php on line 5425

Any help with fixing this would be appreciated. Thanks.
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Undefined function json_decode il y a 2 ans 4 mois #78589

  • DenisChenu
  • Portrait de DenisChenu
  • Hors ligne
  • Moderator Lime
  • Messages : 6276
  • Remerciements reçus 801
  • Karma: 241
Yep,

json_decose : PHP 5 >= 5.2.0
php.net/manual/fr/function.json-decode.php
Dernière édition: il y a 2 ans 4 mois par DenisChenu.
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Undefined function json_decode il y a 2 ans 4 mois #78623

  • Mazi
  • Portrait de Mazi
  • Hors ligne
  • LimeSurvey Team
  • Messages : 5324
  • Remerciements reçus 294
  • Karma: 249
I think Limesurvey 2 requires PHP 5.2 or 5.3. Please update your PHP version.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Undefined function json_decode il y a 1 an 9 mois #89131

  • marcus
  • Portrait de marcus
  • Hors ligne
  • Fresh Lemon
  • Messages : 2
  • Karma: 0
This information about a later version of PHP was very useful. But I wasted a lot of time wondering what was wrong, since the official Release Notes
www.limesurvey.org/en/stable-release
clearly say that LimeSurvey 200+ requires "PHP 5.1.6 or higher".

So much for RTFM, when the FM is more F than M.
Dernière édition: il y a 1 an 9 mois par marcus.
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Undefined function json_decode il y a 1 an 9 mois #89138

  • mdekker
  • Portrait de mdekker
  • Hors ligne
  • LimeSurvey Team
  • Messages : 341
  • Remerciements reçus 68
  • Karma: 38
Our manual is a wiki and the project is run by volunteers so instead of complaining, you could get over to the wiki to add that information.

Thank you in advance.
---
Menno Dekker
L'administrateur a désactivé l'accès en écriture pour le public.
Cet utilisateur a été remercié pour son message par: DenisChenu

Re: Undefined function json_decode il y a 1 an 9 mois #89203

  • marcus
  • Portrait de marcus
  • Hors ligne
  • Fresh Lemon
  • Messages : 2
  • Karma: 0
I was being snarky, but I was clearly talking about the Release Notes, not the wiki. You seem not to have addressed that at all - unless the official Release Notes are sourced from the wiki, which seems odd; how would general help-y people in the community know what version of PHP the app was coded against? Isn't that for the developers to say? Am I supposed to go edit the wiki with a note that says, "Ignore the Release Notes, the necessary PHP version appears to be something higher than specified, but I'm not sure which?"

When we users go to download code to install or upgrade LimeSurvey, the most important thing is the Release Notes, which are specifically called to our attention on the "Download" page and displayed clearly on the "Latest stable release" page. Here's a screenshot:

stable-release-snap.png


I took this explicit information in good faith and did follow the upgrade process detailed in the wiki. Eventually, after becoming thoroughly frustrated, I managed to get errors displayed and finally got to this page, where I find someone with the same problem and someone, apparently on the team, saying they "think" a later version is required. This may explain why the Release Notes are not right, since people on the team may not be sure themselves. This is scary.

The Release Notes for any project are necessary, fundamental documentation, presumably compiled by the project's core team. In this case, they appear to have been the direct cause of a failed upgrade. This is really not ok. I'm sorry if my saying so offends the sensitive but, while someone in my situation can always be more diplomatic (especially me, let's face it), actually distributing software with instructions that might see the software fail to run at all is pretty bad. If it were my project, I'd expect people to be pretty annoyed, and to see the project in a somewhat less favourable light.

Anyways, enough of this. Maybe I just suck and should be locked in a room with no network access, rocking backwards and forwards, wearing a jacket with inexplicably long sleeves, unable to be helped by confused psychologists who, sadly, might have been able to decipher my mumblings if only they'd done some programming training.

But it would be kind of nice, for other, less annoying hapless upgraders, assuming the PHP version issue is actually the issue, to actually find out which version of PHP this app should run on. Even a developer saying something like "well, the one on my dev box is PHP blah.blah, so that should work" would help. But I concur that I may have exhausted my ration of tolerance and will be left to suck it and see. I return now to the succour of darkness.
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Undefined function json_decode il y a 1 an 9 mois #89207

  • c_schmitz
  • Portrait de c_schmitz
  • Hors ligne
  • LimeSurvey Team
  • Messages : 755
  • Remerciements reçus 104
  • Karma: 88
First let me say that we are sorry for the inconvenience.

Well, in general the release notes and requirements are right. You can have json_encode, json_decode with version older than 5.2, too. You will just have to have the json PECL library installed on your system. (see pecl.php.net/package/json).

Unfortunately until now nobody thought of adding this to the installer requirement check yet - but it will be added in the next version.
Support us, too. Donate to the LimeSurvey project and help keep us going!
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Undefined function json_decode il y a 1 an 9 mois #89215

  • c_schmitz
  • Portrait de c_schmitz
  • Hors ligne
  • LimeSurvey Team
  • Messages : 755
  • Remerciements reçus 104
  • Karma: 88
Marcus, one more thing though. The note from Mazi is seven months old - LimeSurvey 2.0 was not released yet at the time - so Mazi did a wild guess there. Anyway, no reason to get so upset about this.
Support us, too. Donate to the LimeSurvey project and help keep us going!
Dernière édition: il y a 1 an 9 mois par c_schmitz.
L'administrateur a désactivé l'accès en écriture pour le public.
Modérateurs: ITEd
Temps de génération de la page : 0.220 secondes
Donation Image