Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
oil seems to be mysql centric
  • Hi all, for the last couple hours ive tried getting oil r session:create to work, until finally I started to look into the oil source code. It seems to assume everyone uses mysql. For instance:

    oil r session:create , creates the following SQL for a pdo/pgsql setup:

    CREATE TABLE `sessions` (
        `session_id` varchar(40) NOT NULL,
        `previous_id` varchar(40) NOT NULL,
        `user_agent` text NOT NULL,
        `ip_hash` char(32) NOT NULL,
        `created` int(10) UNSIGNED NOT NULL,
        `updated` int(10) UNSIGNED NOT NULL,
        `payload` longtext NOT NULL,
        PRIMARY KEY `session_id` (`session_id`)
    ) ENGINE = InnoDB  DEFAULT CHARACTER SET utf8;

    Is this a known problem?  I assume manually creating the session db is the only available option?

    Regards,

    Cor
  • Well, ive given up on postgres. It seems postgres support on fuel is minimal, barely usable. Switched to mysql instead. Maybe the docs should mention to not use postgres on 1.x :)
  • HarroHarro
    Accepted Answer
    It's the DB layer, that was originally ported from Kohana, and in this case the DBUtil methods, that are MySQL centric. Regular DB access, via PDO, works fine.

    The current layer doesn't allow for an easy fix, which is why we're going to switch to a newly written DB layer called Cabinet, which you can find at http://github.com/Frenkynet/Cabinet and which does support multiple SQL dialects by design.

    If you want you can already use it, install it in a vendor folder in app, and define the namespace in the app bootstrap like so:
    Autoloader::add_namespace('Cabinet\\DBAL', APPPATH.'vendor/Cabinet/DBAL/', true);

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion