Friends I am trying to connect to a Microsoft Access database using PHP, on my computer using XAMPP it connects perfectly and I can make queries without problems.
The problem is when I want to do it in my hosting I get the following error:
As I tried to change the file permissions to ** 777 ** because I thought it was because of that and I still can not solve this problem
This is my code:
<?php
$dbName = $_SERVER["DOCUMENT_ROOT"] . "/cookies/printSaver.mdb";
//home/ezujjnuo/example.com/cookies/printSaver.mdb
if (!file_exists($dbName)) {
die("No found.");
}
$db = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$dbName; Uid=; Pwd=;");
$productId = "Rafael Dorado";
$sql = "SELECT * FROM Prints";
$result = $db->query($sql);
$row = $result->fetch();
$productPrice = $row["Owner"];
$productPriced = $row["Printed"];
echo $productPrice;
echo $productPriced;
?>
And this is my database:
This is my PHPinfo;
Error_log:
I already tried placing the file permissions on 777 but it has not worked
</div>