On my website I have a registering form for new users to sing up.
When I register an account, or when my friends try it, the process succeeds and the data is inserted in the database.
The problem is that when other people, from all over the world, register an account most of the time this happens:
1) The process succeeds, with no errors that are thrown.
but
2) No data is inserted into the database.
The database connection is created with:
// Connecting to the database
$database = new mysqli($DatabaseServer, $DatabaseUser, $DatabasePass, $DatabaseName);
In the registering process the data is inserted with:
$stmt = $database->prepare("INSERT INTO `users` (`username`, `password`, `email`, `email_activation_code`, `name`, `active`, `ip`, `date`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
$stmt->bind_param('ssssssss', $_POST['username'], $password, $_POST['email'], $email_code, $_POST['name'], $active, $_SERVER['REMOTE_ADDR'], $date);
$result = $stmt->execute();
$stmt->close();
So far I've tried:
- register from multiple locations with a vpn, and from different physical locations, all successful.
-I've made logs of the data that is used when registering when it fails (with permissions of the user).
Nothing weird is to be seen, and when I use his data I can register an account perfectly.
When doing this we both tried it around the same time, while I had the database open, so I'm sure the database is running at that moment (or an error should have been throw because of the missing connection anyway).
-I've tried to made a log of the $stmt->error_list
which results into nothing (because no errors are thrown).
-Normal error catching with a 'try catch' also results into nothing, because, again, no errors are thrown.
I noticed the problem after updating the database to mariadb 10.3.20. It is now on version 10.3.22.
I'm at the point that I have no idea where to look anymore since only a part of the registering process fail.
Any direction to look into is appreciated.