I'm using Ubercart 1.3 and Ubercart Ajax Cart 1.0-beta4 and this error comes up (via firebug console) every time I add an item to cart. The add to cart button is replaced by spinning wheel, but after that, nothing happens.

Actual error message:

Fatal error: Call to undefined function json_encode() in /chroot/home/mysite.com/sites/all/modules/ubercart/contrib/uc_ajax_cart/uc_ajax_cart.module on line 308

Oh, and this only occurs on my live site, my localhost copy is working just fine. Does anyone have also this problem? How can I fix this?

Thanks!

Comments

Erik Seifert’s picture

This is your PHP Version. json_encode is in PHP5.2 not earlier. But in next release ( today ) there will be a wrapper for this function.

Erik Seifert’s picture

Status: Active » Reviewed & tested by the community

Please check and give me a feedback.

Erik Seifert’s picture

Assigned: Unassigned » Erik Seifert

Assign to me ;- )

peps’s picture

Status: Reviewed & tested by the community » Fixed

Didn't knew that my host disabled json by default.

Thanks for the fix!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.