ADONewConnection: Unable to load database driver ''

QuestionsADONewConnection: Unable to load database driver ''
Gert Zumtobel asked 5 months ago

Laravel9

I keep getting these errors sporadically under laravel9/10

Call to a member function SetFetchMode() on boolC:\xampp\htdocs\GP-SK\app\Classes\phpgrid\jqgrid_dist.php#128

Gert

3 Answers
Abu Ghufran Staff answered 5 months ago

Hello,

This error comes when your connection object is storing false. And it happens when the code is unable to connect to database due to some wrong configuration.

You need to check the database configuration $dbconf, like following:

Easy way to diagnose is to make an independent php code that connects to the database. And then use that configuration in datagrid code.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Gert Zumtobel answered 5 months ago

Hello, that’s exactly how I see it,

sometimes it doesn’t work, the whole thing under Laravel9 and Xampp
I can’t explain it, reload 5 pages 2 times it doesn’t work 3 times it gets even worse with the subgrid and then nothing works anymore.

The error is always the same:

Call to a member function SetFetchMode() on boolC:\xampp\htdocs\GP-SK\app\Classes\phpgrid\jqgrid_dist.php#128

 

Here my Config:

$db_conf = array (
    'type' => env('DB_TYPE'),
    'server' => env('DB_HOST'),
    'user' => env('DB_USERNAME'),
    'password' => env('DB_PASSWORD'),
    'database' => env('DB_DATABASE'),
);
Abu Ghufran Staff answered 5 months ago

Try use direct values instead of env function. May be laravel is unable to read from your .env file.
Let me know if issue persists.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

8 + 4 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?