search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

JSON error in file: daypilot-all.min.js

Related article: PHP Hotel Room Booking System (JavaScript/HTML5, MySQL)
Asked by Bob
1 month ago.

I am trying to test the php-hotel project, but am unable to run it successfully. I am getting the following error in console: uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
onreadystatechange https://localhost/hotel/js/daypilot/daypilot-all.min.js:9
I am trying to run the project in the htdocs folder in XAMPP

Answer posted by Dan Letecky [DayPilot]
1 month ago.

This happens if the PHP backend returns an error instead of a JSON response.

I recommend checking the backend HTTP request using browser developer tools. The response will contain an error message which can point you to the right direction. Most likely this is something like file permissions, incorrect database credentials...

Let me know if it didn't help.

Comment posted by Bob
1 month ago.

Thanks Dan, that totally worked! My DB credentials were wrong.
Awesomeness :)

New Reply
This reply is
Your name (optional):