PHP Script Redirection Issue Due to InfinityFree Security System

I had a look at your website, and I’m not sure that the errors you’re seeing are a hosting issue.

As you can see, the error message says that Javascript is unable to parse text as JSON. However, when I check the Network tab in my browser, I don’t see any requests that actually return JSON.

The update_cart.php endpoint just returns the text Cart data updated successfully, which is not valid JSON. And the get_product_details.php endpoint doesn’t return anything at all (which is also not valid JSON).

Which clients are that? Using this code from your website hosted with us should just work. But hosting the frontend on another domain, or even on your own computer for development, will not work.

This is a little bit restrictive, but I don’t see any reason why your shop cannot work on our hosting for your customers.

Usually this is caused by not configuring a MySQL charset in your code, after having entered the database contents through phpMyAdmin.

5 Likes