What's the problem with this? It produces no output and no errors.
<!DOCTYPE html>
<html>
<body>
<?php
ini_set("display_errors",1);
include "/usr/shared/web/<my account name>/cgi-local/pdo.php";
echo $testString . "<br>";
try {
$dbh = new PDO($dsn, $user, $password);
} catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();
}
echo "Made it past try/catch.<br>";
?>
</body>
</html>
It worked before I added the six lines starting with "try", so I know the include works. (The "<my account name>" is not to be taken literally.) It correctly displays the value assigned, in the included file, to $testString. The included file also assigns values to the variables that store the credentials. The added lines come straight from:
http://php.net/manual/en/pdo.construct.php, except I added the final echo.
Even if I messed up assigning the correct text to the variables that store the credentials, shouldn't I still get some output?
When I try to use mysqli instead of pdo, also borrowing code straight from php.net, I get:
"Fatal error: Cannot instantiate non-existent class: mysqli in /usr/shared/web/newje5/php/mysqliTest.php on line 10"
Does that mean my host doesn't support mysqli, or might there be something I have to do to enable it?