Title: SyntaxError: Unable to parse JSON string
Last modified: August 21, 2016

---

# SyntaxError: Unable to parse JSON string

 *  Resolved [sbdm05](https://wordpress.org/support/users/sbdm05/)
 * (@sbdm05)
 * [12 years ago](https://wordpress.org/support/topic/syntaxerror-unable-to-parse-json-string/)
 * Hello Everyone!
    I keep on having this error ‘SyntaxError: Unable to parse JSON
   string’ whenever i try to add something to the cart. Does anyone can help? I 
   use a free webhost, 000webhost, do you think it is related? Many Many thanks 
   for your help! Cheers
 * [https://wordpress.org/plugins/wppizza/](https://wordpress.org/plugins/wppizza/)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntaxerror-unable-to-parse-json-string/#post-4772384)
 * got a link ?
 *  Thread Starter [sbdm05](https://wordpress.org/support/users/sbdm05/)
 * (@sbdm05)
 * [12 years ago](https://wordpress.org/support/topic/syntaxerror-unable-to-parse-json-string/#post-4772387)
 * Thank you!
    here is the link: [http://www.pizza-americaine.site40.net/?page_id=79](http://www.pizza-americaine.site40.net/?page_id=79)
 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntaxerror-unable-to-parse-json-string/#post-4772392)
 * hmm,
 * there are 2 parts to this.
 * the error you are getting is because your are running out of memory
    <b>Fatal
   error</b>: Allowed memory size of 67108864 bytes exhausted (tried to allocate
   491520 bytes)…..in wppizza/ajax/get-json.php</b> on line <b>461
 * the above is very odd though because
    a) i am running it here with 2mb memory
   without issue (and you have a mem limit of 64mb)
 * b) when adding an item , the script should never even get to line 461 (in fact,
   it should exit at about line 121)
 * something else is amiss here (and i just tested it with your theme and the plugins
   you have – at least the ones i can see in the friontend – and it works just fine
 * might be worth turning on debug and check what your debug log file says
 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntaxerror-unable-to-parse-json-string/#post-4772396)
 * your theme/host also seems to include an analytics code which MIGHT cause issues(
   just trying to wittle things down)
 * maybe disable that one ([http://www.youtube.com/watch?v=ohwtC3_qd4o](http://www.youtube.com/watch?v=ohwtC3_qd4o))
   and see if that helps things (long shot though)
 * other than that, did you edit anything (templates etc) ?
 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntaxerror-unable-to-parse-json-string/#post-4772397)
 * this might also be worth a read:
 * [http://stackoverflow.com/questions/2268868/webhoster-inserts-a-javascript-which-brokes-my-code-how-to-remove-it](http://stackoverflow.com/questions/2268868/webhoster-inserts-a-javascript-which-brokes-my-code-how-to-remove-it)
 *  Thread Starter [sbdm05](https://wordpress.org/support/users/sbdm05/)
 * (@sbdm05)
 * [12 years ago](https://wordpress.org/support/topic/syntaxerror-unable-to-parse-json-string/#post-4772469)
 * Hello Ollybach
    thank you very much ive tried to remove the script following 
   the video. That did not make any change. The only modification in the css i ve
   made is to center the logo. But i dont thing that can have a connection with 
   the issue. So i ve changed template to use TwentyTwelve, and it seems that the
   error is gone. But its a pity because i very much like Responsive. With Twentytwelve,
   could you please tell me how I can have the cart displayed on the very right?
   [http://www.pizza-americaine.site40.net/?page_id=79](http://www.pizza-americaine.site40.net/?page_id=79)
 * Maybe i could change from webhost.
    Would you be kind enough to tell me which
   one you’re using? (free host)
 * Many thanks for your help !
 *  Thread Starter [sbdm05](https://wordpress.org/support/users/sbdm05/)
 * (@sbdm05)
 * [12 years ago](https://wordpress.org/support/topic/syntaxerror-unable-to-parse-json-string/#post-4772473)
 * Also, the debug consol says with Responsive theme:
 * Notice: Constant WP_MEMORY_LIMIT already defined in /home/a4390281/public_html/
   wp-config.php on line 101
 * I forgot to tell you i tried to increase memory by following these instructions:
   
   [http://blog.kdmahawar.com/php-memory-error-wordpress-000webhost/](http://blog.kdmahawar.com/php-memory-error-wordpress-000webhost/)
 * but i removed everything now.
 * Again, thank you very much
 *  Thread Starter [sbdm05](https://wordpress.org/support/users/sbdm05/)
 * (@sbdm05)
 * [12 years ago](https://wordpress.org/support/topic/syntaxerror-unable-to-parse-json-string/#post-4772508)
 * Hello there
    it appears that using chrome, i have this error instead
 * error : SyntaxError: Unexpected token <
 * and on safari i have:
    error : SyntaxError: Unable to parse JSON string
 * In case it helps!
 * many thanks!
 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntaxerror-unable-to-parse-json-string/#post-4772512)
 * >Notice: Constant WP_MEMORY_LIMIT already defined in
 * looks like you have the same declaration 2x
 * >error : SyntaxError: Unexpected token <
    and >error : SyntaxError: Unable to
   parse JSON string
 * still the same error which says ” Allowed memory size of 67108864 bytes exhausted”
   etc
 * > webhost:
 * there are 1000’s and i hazard I guess that my host (which is in the UK and not
   free) will not necessarily be a good choice in your case .
    your host should 
   really be in the territory/country your website is in
 * at the end of the day, you get what you pay for
 * also, when you used a different theme it worked (from what you were saying) now
   you are using another theme again and it doesnt , so somewhere along the lines
   something isn’t right
 * as i mentioned , using responsive theme ore twentytwelve , or any other standard
   themes (and many more) work just fine as far as I am concerned so something appears
   to be messed up your end (and it may just be your host)….
 * sorry, but i dont think there’s anything wrong in the plugin or anything i can
   do, as I’m sure if that were the case there would be a lot more complaints/support
   requests
 *  Thread Starter [sbdm05](https://wordpress.org/support/users/sbdm05/)
 * (@sbdm05)
 * [12 years ago](https://wordpress.org/support/topic/syntaxerror-unable-to-parse-json-string/#post-4772535)
 * thank you very much for your reply! you’re totally right, i will just go ahead
   and pay for a regular host.
    thank you again!
 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntaxerror-unable-to-parse-json-string/#post-4772544)
 * there are probably some other free hosts that do not inject all sorts of ads/
   js. just seems that this one seems to do this sort of thing
 * (never mind the fact that they are also injecting a 2 year old version of jQuery
   so you end up with 2 separate/different versions of jquery on your page. that’s
   just asking for trouble)

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘SyntaxError: Unable to parse JSON string’ is closed to new replies.

 * ![](https://ps.w.org/wppizza/assets/icon-256x256.png?rev=2498121)
 * [WPPizza - A Restaurant Plugin](https://wordpress.org/plugins/wppizza/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wppizza/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wppizza/)
 * [Active Topics](https://wordpress.org/support/plugin/wppizza/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wppizza/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wppizza/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [ollybach](https://wordpress.org/support/users/ollybach/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/syntaxerror-unable-to-parse-json-string/#post-4772544)
 * Status: resolved