Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDOException could not find driver #76

Open
devharshindia opened this issue Jul 30, 2021 · 4 comments
Open

PDOException could not find driver #76

devharshindia opened this issue Jul 30, 2021 · 4 comments

Comments

@devharshindia
Copy link

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?

@ibrahpremier
Copy link

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

@devharshindia
Copy link
Author

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.

@ibrahpremier
Copy link

`
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

@mauriciolanner
Copy link

Do we have any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants