I am Trying to Publish Online a Website Developed with PHP PDO, So After I uploaded the All Files to The Online Server, but I am Got This Error Connection failed: could not find driver.
<?php
// Config Credentioals \
$server = 'host';
$user = 'user';
$password = 'password';
$databse = 'db_name';
try {
$dns = "mysql:host=".$server.";dbname=".$databse;
$config = new PDO($dns, $user, $password);
// set the PDO error mode to exception
$config->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}catch(PDOException $e) {
die("Connection failed : " . $e->getMessage());
}
?>
source https://stackoverflow.com/questions/70643716/how-to-uncomment-extension-php-pdo-mysql-dll-in-cpanel-web-hosting-in-php-ini
Comments
Post a Comment