Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Website URL

(please specify the URL of the site on which you are experiencing the problem)

Error Message

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Other Information

This is an exam and the site worked earlier, but when we were going to show it to the professor it didnt work. What can the issue be and how can we resolve this?

2 Likes

I forgot to add that the php works through my files, but it doesnt work on infinity free

Did you follow the article?

3 Likes

Yes, I tried now. And got this message " Fatal error : Uncaught mysqli_sql_exception: Connection timed out in /home/vol3_8/infinityfree.com/if0_36277689/htdocs/precisiondetailing_endre.php:100 Stack trace: #0 /home/vol3_8/infinityfree.com/if0_36277689/htdocs/precisiondetailing_endre.php(100): mysqli_connect(‘if0_36277689_pr…’, ‘if0_36277689’, Object(SensitiveParameterValue), ‘sql109.infinity…’) #1 {main} thrown in /home/vol3_8/infinityfree.com/if0_36277689/htdocs/precisiondetailing_endre.php on line 100"

You probably have the wrong DB connection params

3 Likes

But it did work and then it stopped working. I have looked over over 10 times. I will open a new discussion. Thanks for all help!

Website URL

(please specify the URL of the site on which you are experiencing the problem)

Error Message

Fatal error : Uncaught mysqli_sql_exception: Connection timed out in /home/vol3_8/infinityfree.com/if0_36277689/htdocs/precisiondetailing_endre.php:101 Stack trace: #0 /home/vol3_8/infinityfree.com/if0_36277689/htdocs/precisiondetailing_endre.php(101): mysqli_connect(‘if0_36277689_pr…’, ‘if0_36277689’, Object(SensitiveParameterValue), ‘sql109.infinity…’) #1 {main} thrown in /home/vol3_8/infinityfree.com/if0_36277689/htdocs/precisiondetailing_endre.php on line 101

Other Information

Everything looks good and I have seen through the creditensials over 10 times. Everything is put in right. It worked at first and then stopped working. Any idea why? This is an exam btw.

Please don’t create multiple topics on the same issue.

Please share your database connection code, be sure to hide your password.

3 Likes

The correct order of arguments for the function is mysqli_connect($hostname, $username, $password, $database). You put the database name first and the hostname last. If you put the arguments in the right order, it should work.

Because of course, you will not be able to connect to a host that has the database name as hostname.

4 Likes

YUuup this was the problem. Such a stupid and simple mistake lol. Thanks a lot for the help tho!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.