Here is my server error log:
[15-May-2022 18:50:41] WARNING: [pool zoldos.net] child 3148239 said into stderr: "Stack trace:"
[15-May-2022 18:50:41] WARNING: [pool zoldos.net] child 3148239 said into stderr: "#0 {main}"
[15-May-2022 18:50:41] WARNING: [pool zoldos.net] child 3148239 said into stderr: " thrown in /var/www/vhosts/zoldos.net/httpdocs/xxx.php on line 39"
[15-May-2022 18:50:46] WARNING: [pool zoldos.net] child 3148350 said into stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to a member function bind_param() on bool in /var/www/vhosts/zoldos.net/httpdocs/xxx.php.php:39"
[15-May-2022 18:50:46] WARNING: [pool zoldos.net] child 3148350 said into stderr: "Stack trace:"
[15-May-2022 18:50:46] WARNING: [pool zoldos.net] child 3148350 said into stderr: "#0 {main}"
[15-May-2022 18:50:46] WARNING: [pool zoldos.net] child 3148350 said into stderr: " thrown in /var/www/vhosts/zoldos.net/httpdocs/xxx.php on line 39"
Okay, so I narrowed it down even further. If the one snippet is commented out, the other then works. But, also vice versa! But if both are enabled, it errors out. So there seems to be a deeper issue. Here are both scripts:
$stmt = $db_oldtts->prepare('SELECT COUNT(*) FROM xf_user WHERE username = ?');
$stmt->bind_param('s', $olduser);
$stmt->execute();
$stmt->bind_result($count);
$stmt->fetch();
if($count == 0) {
$name_error = "<span class='error_msg'>TTS former username not found!</span>";
}
$stmt = $db_oldtts->prepare('SELECT COUNT(*) FROM xf_user WHERE email = ?');
$stmt->bind_param('s', $oldemail);
$stmt->execute();
$stmt->bind_result($count);
$stmt->fetch();
if($count == 0) {
$mail_error3 = "<span class='error_msg'>Old e-mail not found!</span>";
}
Any thoughts? Thanks!