PHP version 8.4.27 is available, and both PDO and PDO MySQL are enabled.
However, I receive HTTP 500 when accessing several PHP files inside htdocs/waeckit-api/, including a file containing only:
<?php
echo "TEST TWO WORKS";
Another PHP diagnostic file in the same directory executes successfully. My API health endpoint returns JSON, but reports a server error.
Could you please investigate the PHP error logs and explain why these files return HTTP 500?
### Other Information
https://www.waeckit.great-site.net
Welcome to the InfinityFree community forum! Good to have you here.
Most people answering here are volunteers. They’re often the fastest source of help. Admin (the only staff member) checks in about once a day for issues on our end.
Volunteers can’t see your account or website. Share what you actually see, like error messages and what happens when you try something. That’s more useful than your theory of what’s wrong.
AI tools often get InfinityFree wrong. If a volunteer’s advice differs from what an AI told you, please try the volunteer’s suggestion first.
Solving an issue is a joint effort. Try the suggestions you get and report back what happened.
Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.
Free hosting doesn’t keep PHP or web server error logs, so nobody can read them for you. The way to see the real error is to turn on Display Errors under Alter PHP Config in the control panel. The article below has the steps.
A file containing only echo "TEST TWO WORKS"; shouldn’t crash PHP on its own. So I need to know what the 500 page looks like in your browser. Is it a plain “HTTP ERROR 500” page, or a page titled “Something Went Wrong!”? The second one means there’s a problem in a .htaccess file rather than in your PHP code, and there’s a separate article on that.
Please also post the full URL of one of the failing files. If Display Errors is on and you still see no message, post what you get instead.
A PHP diagnostic file named php-check.php executes successfully inside htdocs/waeckit-api/. However, another file in the same directory containing only <?php echo "TEST TWO WORKS"; returns HTTP 500.
A simple PHP file in the website root executes successfully. The API health endpoint returns JSON with "success": false and "message": "Server error".
Could you please inspect the server error logs and investigate why some PHP files in the waeckit-api directory return HTTP 500?
A PHP diagnostic file named php-check.php executes successfully inside htdocs/waeckit-api/. However, another file in the same directory containing only <?php echo "TEST TWO WORKS"; returns HTTP 500.
A simple PHP file in the website root executes successfully. The API health endpoint returns JSON with "success": false and "message": "Server error".
Could you please inspect the server error logs and investigate why some PHP files in the waeckit-api directory return HTTP 500?
Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.
I can’t pull up the server error logs, because free hosting doesn’t keep PHP or web server error logs. The way to get the real error is to show it on the page. In the control panel, open Alter PHP Config, pick your domain, click Alter PHP Directives, set Display Errors to On, and save. Then reload the file that returns the 500.
The article below covers this, including what to do if your software hides errors itself:
Once Display Errors is on, what does the failing TEST TWO WORKS file show? Please post the exact message. If it still shows a plain HTTP ERROR 500, say so, and also tell me whether the waeckit-api folder has a .htaccess file.
Please try enabling display_errors yourself first and see if that shows more information. And if not, then please:
Clarify what the page shows exactly. Like Lemni said in the first reply, there are multiple flavors of HTTP 500 errors, and it matters which one you get.
Share the exact URL to the test file so we can see it for ourselves.
That’s not necessary, and generally not recommended when you have files that contain only PHP code.