React+php hosting

Website URL

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

Error Message

(white screen only)

Other Information

(I’m trying to host my full stack app, built using PHP, graphql, MySQL and reactjs, I moved my server code, build folder content and .htaccess file inside htdocs folder ) but I get a white screen, with the correct tab title from my react app, but no content at all, what did I do wrong?

Hi and welcome to the forum! For me the page loads, but the items don’t want to show up; so I guess it’s the GraphQL request failing. You’ll have to install a SSL certificate as the GraphQL request is done by calling it through HTTPS on your code; here’s a guide to do that:

Also, as for the white screen, can you please send us an URL with the faulty page so we can debug it better? If you don’t do that I’ll be forced to send these articles as well, as a white screen is a symptom of a HTTP ERROR 500 on that page and most of these errors are solved by also checking the MySQL connection details:

4 Likes

hey, thank you for the response, i fixed the white screen right after I created this post, it was matter of htaccess and moving the files around, but I got it to work, currently I’m struggling with the grahpql, since some queries work and the others just don’t although the difference between them is just an id value, which is super weird tbh

i found out that my problem might be a database issue related to the version locally I’m running 8.0 but the server is running 10.6.19-MariaDB, when I tried to migrate my dump into the database I got an error regarding utf8mb4 COLLATE utf8mb4_0900_ai_ci, and I have some fields with escaping codes and HTML, is their any way to upgrade the database version? on free tier

No, it’s not possible to change the database version on free hosting.

3 Likes

Can you please share the exact error you got? And even better: could you share the specific statement from the database dump that triggered this error?

MariaDB 10.6 should be functionally equivalent to MySQL 8.0, but it’s not exactly the same. I doubt upgrading or downgrading MariaDB is the solution here, but it’s hard to tell because I don’t quite know the exact issue.

3 Likes

i’ve fixed the issue by creating methods that handle the data encoding into json before sending them to frontend, and now it works well, thank you for your concern, you can mark this ticket as resolved.

1 Like

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