0

I'm actually getting this error at the server:

Warning: json_encode() expects exactly 1 parameter, 2 given

At the localhost it works perfectly. So i think that the problem is that the PHP version of the server is 5.2.

Is there a solution? Or another way to do it?

Sam
7,42216 gold badges48 silver badges68 bronze badges
asked Nov 20, 2013 at 12:52
4
  • could this be your problem? stackoverflow.com/questions/1515925/problem-with-json-encode Commented Nov 20, 2013 at 12:58
  • Warning: PHP 5.2 was declared end-of-life nearly four years ago, and has not had any updates since then, including security updates. It is known to be insecure and nobody should be running a production server with it today in 2013. You should contact the administrator of your server and ask why it hasn't been upgraded in all that time. Commented Nov 20, 2013 at 13:26
  • it's a free server... thanks anyway! Commented Nov 20, 2013 at 13:38
  • I just resolved the problem using (float) into the array. I can't resolve the question yet because my low reputation Thanks for all! Commented Nov 20, 2013 at 13:40

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.