Does anyone know a good PHP ORM that does NOT use PDO?

I am creating a webapp for a department on a large campus that will eventually run on corporate servers (I use the term "enterprise" freely).

The problem is that administrators refused to compile and enable any PDO extension other than SQLite. They do have mysql and mysqli, but this is not a complete loss.

Does any of us know a good ORM for PHP that DOES NOT rely on PDO as the main engine?

I already looked at Doctrine and Propel (both excellent frameworks), although I could not figure out how to cut PDO from the inside.

Change . Here is the answer I received from the administrators on the server:

Sean

We tried, unsuccessfully, to build PHP several times with the PDO extension enabled. The reason that we were not successful is complex, but it stems mainly from the fact that the web environment was originally configured with some database driver libraries compiled statically, while others were compiled dynamically, and mixing causes PDO loudly. The reason that everything was done in this way was due to a bug in early versions of PHP 5.x, which today is not a problem (or at least less than one), but switching is difficult, because changes will require changes in php. ini, and since each site (including sites on [server redacted]) has its own php.ini (approximately 22,000 files, many of which are user-modified),it is very difficult to push this change (and not creating a change causes errors [I don’t remember if they are fatal or not] on pages served from accounts with non-updated files).

+3
1

, ORM PDO, .

MySQLi, PDO (IIRC MySQLi , PDO).

if (extension_loaded('pdo_mysql') == false) {
    class PDO {
        protected $connection;

        public function __construct($dsn, $username = null, $password = null, array $driver_options = array()) {
            $this->connection = new MySQLi(...);
        }
    }

    class PDOStatement { ... }
    class PDOException extends RuntimeException { ... }
}

PDO API, .

+3

Source: https://habr.com/ru/post/1785795/


All Articles