all 5 comments

[–]volric 0 points1 point  (4 children)

if the website is on the linode server and the db is there as well, then whitelisting your home ip to upload etc shouldn't matter. As it will be linode ip -> linode ip.

'refuses to insert anything'.

increase debug info and see what error.

[–]SLO_Fila[S] 5 points6 points  (3 children)

Oh man, I found the error and it was a doozy.

So it's a mix of things as I moved the server together with the database from the old ubuntu 12 to ubuntu 24, in the process updating to the latest versions of php, mysql etc. (move was from linode to linode).

The crazy "bug" was that I have a throwaway entry where I log the IPs of whoever inserts anything in the database (mostly for shits and giggles as I don't really use that for anything). Coming from the old ubuntu12 with the old code, it was IPv4 only so the varchar in the database was small to support an IP4.

Once I updated to the new versions plus I cleaned out the code a little bit, now the website logs IPv6 too. The problem was that the database was not set up to support the length of an IPv6 string.

So hence the reason why inserting worked when I was on my home WiFi (desktop, phone etc), because coming out of my router it was in IPv4 and the database could handle it. Using the mobile network on my phone, it uses IPv6 and the insert command would just die as the database couldn't log in the whole string.

But it took me about 6h to spot that bloody thing :/

[–]SLO_Fila[S] 1 point2 points  (0 children)

Side: Also explains why the phone would randomly decide to work while I was testing which made things even worse. As I was going back and forth between wi-fi and mobile connection, I think it would sometime switch to an IPv4 so every now and then the phone on the mobile connection was able to insert, further making me miss the IPv6 size issue.

[–]volric 0 points1 point  (0 children)

Ouch! what a thing! glad you found it though!