SQL database help

Hi everyone,

I’m currently hosting my website on InfinityFree’s free plan. I’ve set up a MySQL database that logs data using PHP. However, I’m facing an issue where the database sometimes stores the data correctly, but other times it doesn’t update at all.

There are no visible PHP errors, and the connection seems fine. I’ve even added basic error handling using mysqli_error(), but nothing unusual shows up.

I’m wondering:

  • Could this be due to free hosting limits (like SQL query limits or server load)?
  • Are there any known issues with database reliability on the free plan?
  • What should I check to make sure my logs are consistently stored?

Any suggestions or experiences would be really helpful! Thanks in advance. :folded_hands:

Best,
Soham

1 Like

I would put debugging steps through your php, so you can see what step fails.

It sounds like something is causing your php to fail in certain cercumstances.

8 Likes

For the first two questions, the answers are no and no. Our MySQL servers work exactly as you’d expect MySQL to work, and I rarely hear about issues with them. Sometimes there are cases where people have incorrect config or are trying to use features that aren’t supported.

But in any case, no matter what the reason: if the query works, it works, and if it doesn’t, it will tell you. It could be that the query didn’t run successfully, or maybe it “worked” but just didn’t work as intended (like an UPDATE query that executed successfully but didn’t match the desired row).

Can you please tell/show more about the code that doesn’t work consistently?

8 Likes

Maybe learn php?.. What kind of website are you making? I made my own messages website where people message a forum like kind of people create their accounts then they log in then they send a message photos,videos, gifs, and messages, and it uses mysql database and php, I also tested it out before I put it up on infinity free using xampp so then I uploaded it, exported the sql file from the phpmyadmin for xampp then imported it into phpmyadmin for the mysql database for infinity free, and i made sure it was the right database name the one i created for infinity free and the other details to connect to the mysql database

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