gabordemooij / redbean

ORM layer that creates models, config and database on the fly
https://www.redbeanphp.com
2.31k stars 279 forks source link

Redbean V5.4 -- RedBeanPHP\Driver\PDO Class Not Found #761

Closed justtoprogram closed 4 years ago

justtoprogram commented 4 years ago

Hello,

I'm using Redbean PHP v5.4 and I'm receiving this error:

"Class 'RedBeanPHP\Driver\PDO' not found"

This is my setup below, not sure if it would help.

R::setup('mysql:host='. DBC::HOST .';dbname='. DBC::SCHEMA, DBC::USER, DBC::PASS, true);


I have in another project Redbean v5.2 which I copied into this project and worked perfectly fine didn't receive this error. I also tested the PHP PDO driver which is working fine as well.

I am using PHP 7.3

What might I be doing wrong?

justtoprogram commented 4 years ago

Hey,

Just a follow up. Has anyone had a chance to look into this?

gabordemooij commented 4 years ago

This might be an autoloader issue, you can try to use the all-in-one pack on the website: https://redbeanphp.com/index.php?p=/download

Without further data it is impossible to determine what's wrong. It does not seem like a RedBeanPHP issue.

justtoprogram commented 4 years ago

I tried the all-in-one, unfortunately, came across the same issue.

What I find interesting is the fact that V5.2 works fine, no hiccups, however V5.4 appears to have the issue. I'll try V5.3 when I get a chance to see what happens.

I'll review the autoloading I do, however it hasn't changed in forever.

gabordemooij commented 4 years ago

Do you have PHP extension PDO installed? On a run-of-the-mill Linux I get this:

afbeelding