# Showing An error occurred: SyntaxError: Unexpected end of JSON inputbut its ok when run in localhost

**URL:** <https://forum.infinityfree.com/t/showing-an-error-occurred-syntaxerror-unexpected-end-of-json-inputbut-its-ok-when-run-in-localhost/97446>\
**Category:** Hosting Support\
**Created:** [August 14, 2024, 8:10am UTC](https://forum.infinityfree.com/t/showing-an-error-occurred-syntaxerror-unexpected-end-of-json-inputbut-its-ok-when-run-in-localhost/97446 "2024-08-14T08:10:36Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![anon90933456](https://forum.infinityfree.com/letter_avatar/anon90933456/32/5_5575768a8748004e209b776fc1b2916d.png) [@anon90933456](https://forum.infinityfree.com/u/anon90933456)\
**Post date:** [August 14, 2024, 8:44am UTC](https://forum.infinityfree.com/t/showing-an-error-occurred-syntaxerror-unexpected-end-of-json-inputbut-its-ok-when-run-in-localhost/97446/3 "2024-08-14T08:44:19Z")

</div>

Hi and welcome to the forum! The script that is executed after you click on “Convert” throws a HTTP ERROR 500:

> [@Http error 500](https://forum.infinityfree.com/t/49352):
>
> When trying to access your website, you may see a page which returns the status code “500”. In Google Chrome, you’ll see a page with the error code HTTP ERROR 500. There are typically two reasons which can cause this error: The PHP code has crashed. The .htaccess file contains invalid rules. Here are some things you can try to debug and fix this. Fixing crashing PHP code A HTTP ERROR 500 simply tells you that the PHP code has crashed, but gives no information as to why it has crashed. Gett…

Also, I think YouTube converters are not allowed on free hosting because, if your users are using your converter to download music, that is probably illegal and also violating YouTube’s terms of service; I don’t know if someone got suspended for it, but prevention is better than cure. You might be better off reading the [Terms of Service](https://www.infinityfree.com/terms/) before you do anything else.

---

_[View the full topic](https://forum.infinityfree.com/t/showing-an-error-occurred-syntaxerror-unexpected-end-of-json-inputbut-its-ok-when-run-in-localhost/97446)._
