Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Class not found in live environment
  • Hi! I'm having an issue where I am trying to put my site on the live server, but am getting a fatal exception - class not found where it works fine on my local environment. :

  • ErrorException [Fatal Error ]:Class 'Model_SchoolDay' not found

    APPPATH/classes/controller/teacher.php @ line 75

    70    
  • public function action_mydetails(){74        $view->lessonTypes Model_Lessontype::get_types_for_teacher();
    75        $view->schoolDays Model_SchoolDay::get_days_list(static::$teacherID);
    76      
  •   $view->teacherInfo Model_Teacher::get_teacher_details(static::$teacherID);Model:<?php
    use \Model\functions;

    class Model_SchoolDay extends \Model_Crud
    {
    //blah}
    Top of controller:use \Model\SchoolDay;It's in the same directory as the other classes which load fine and as I say, works fine in development environment.
    Any thoughts?
    Cheers!
  • p.s. - sorry for the comment spam... didn't all want to fit in the first box!
  • HarroHarro
    Accepted Answer
    This is not according to the Fuel coding standards: Model_SchoolDay which should be ucfirst, and should be defined in a file that is completely lowercase, including the path.

    So my guess would be you're developing on Windows (or possible on a Mac with case sensitivity switched off) and deployed on Linux?
  • That's done it! Many thanks... renamed files and classes as you suggested. Developing on mac, so case sensitivity much be turned off.

Howdy, Stranger!

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

In this Discussion