INSERT not working

Username (e.g. epiz_XXX) or Website URL

Error Message

Code works on my local XAMPP installation.

When hosting on infinityfree, sql statements aren’t working properly (INSERTS as well as prepared statements).

Other Information

(other information and details relevant to your question)

You do have two errors,

Notice : session_start(): A session had already been started - ignoring in /home/vol19_1/ on line 2

Additionally, I cannot registrar as I get a “Please Match The Requested Format” error.

1 Like

Did you try these?

Hey KangJL, I have checked into that article, but thanks for posting it!

When I imported my database over the imported DB name wasn’t matched (used ‘name’ instead of “epiz_xxxx_‘name’” for the imported file originally.

Functionality has slightly improved after making sure the imported DB’s name had been changed to what infinityfree expected (as well as the user permissions).

A major problem I fixed is my DB works with SQL Views, which happen to not be supported on infinityfree. (Required refactoring app to not use the View).

Still running into two functionality problems (not seen on XAMPP locally):

  1. Cannot register new users
  2. Cannot create new notes

This maybe narrows it down to specifically one type of functionality. I will try importing the DB again, looking for errors - especially surrounding permissions. It is strange that INSERT INTO is working on my note editing, but not on adding notes to DB/registering users.

This is resolved:

I locally changed my project to mirror the DB user/password that would be expected (as well as dropping the SQL View, just in case). This enabled me to troubleshoot permissions locally (epiz user wasn’t properly set up - hostname expected “localhost” but needed to be applied to any host).

After confirming functionality with the new DB name and user creds, I imported the DB to my InfinityFree site (still had an error on import so I probably need to investigate the user a little more), but full site functionality is working!

This site helped me find more error messages for the user:
SHOW GRANTS FOR ‘root’@‘localhost’; - specifically was a helpful query.
Overall changing my local XAMPP db username and password to what I’d use on InfinityFree was a really good troubleshooting step (and obviously the DB name).


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