Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Newbie Question Ubuntu 12.04
  • Hi folks,

    I'm new to FuelPHP and this forum so I apologise if I have missed an answer to this, I looked but couldn't find it.

    I'm running ubuntu 12.04 and already have lamp installed.

    I downloaded the latest FuelPHP (1.4) and was working through the crash course tutorial. Everything seems to set up fine until I get to "prettying the code": when I try to access the page http://localhost/fuel_intro/public/messages I get an error message: ErrorException [ Error ]: Class 'Orm\Model' not found

    I do not want to change my current dev sites unless I know exactly what it is I'm changing but I'm guessing that my lamp installation is missing something from the required xamp installation.
    Can anyone point me in the direction of what I need to install?


    Thanks


  • LynnHtutLynnHtut
    Accepted Answer
    You should check autoload package at app/config/config.php.
    If you does not found app/config/config.php, you can copy from core/config/config.php to app/config folder.
  • Thank you,

    the tutorial is not clear on this and the config.php in app/config returns an empty array.

    I had changed it to

    return array(
        'packages'  => array(
            'orm',
        ),
    );
    which was obviously wrong.

    copying the config from core/config and changing the settings in the 'always_load' array solves the problem.

  • Must be a tutorial written for an earlier version of FuelPHP. Always pay attention to the version, as things may change over time.

    In this case, for v1.4 we have decided to move all config defaults into the core. If will save us from providing defaults in the core whenever we get a config value. Also, the Config class is a lot faster if all requested values actually exists.

    Also, if the tutorial told you to use that array structure, it's wrong (or at least incomplete). 'packages' have always been inside the 'always_load' array.

Howdy, Stranger!

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

In this Discussion