laravel-db2
laravel-db2 copied to clipboard
PDOException could not find driver
Hi, I am getting this error. I have already enabled pdo drivers in php extensions. Also in installation steps queue configuration is a little confusing. Can you please add the dummy code in the steps so that it becomes easier for newbies like me to update the configuration correctly?
for a few days i have been trying to set up a db 2 connection with laravel without success. I have yet installed the ibm driver. I manage to connect with odbc_connect outside of laravel. can you please do a tutorial. thanks in advance
for a few days i have been trying to set up a db 2 connection with laravel without success. I have yet installed the ibm driver. I manage to connect with odbc_connect outside of laravel. can you please do a tutorial. thanks in advance
Hi, can you please share the details on how do created a odbc_connect connection outside of laravel.
` class MyClass { private $server = "Driver={Client Access ODBC Driver (32-bit)};System=SERVER_ADDRESS;"; #the name of the iSeries private $user = USERNAME; #a valid username that will connect to the DB private $pass = PASSWORD; #a password for the username
public function connect()
{
$dbConnection = odbc_connect($this->server, $this->user, $this->pass);
return $dbConnection;
}
public function request()
{
$db = $this->connect();
$req1 = " select * FROM DATABASE.TABLE";
$stmt = odbc_exec($db, $req1);
$row = odbc_fetch_array($stmt);
echo json_encode($row);
odbc_close($db);
}
}
$st = new MyClass(); $st->request(); ` This work for me outside of Laravel
Do we have any solution?