I have a simple select PDO script. When I post to it from a remote server, I get a 500 error. This error isn't showing up in my logs. My error_log is set to debug.
header("access-control-allow-origin: *");
// includes connect to db file here, $con is declared here -
// this is included in other working scripts currently.
echo 'start';
try {
$stmt = $con->prepare('SELECT * FROM users WHERE userEmail=:email ');
$stmt = $con->bindValue(':email','myemail@example.com');
$stmt->execute();
}
catch (PDOException $e) {
echo $e->getMessage();
}
echo 'finish';
No exception error message is shown.
I just get an output of 'start'. Clearly the script isn't completing, but why is nothing letting me know what the problem is? If there is a problem with my PDO statement, shouldn't this be reported with $e-getMessage() ?
What am I missing to debug this?