FUEL_PATH define error
  • I started to upload my website to a hosting server today, however I face this error when I try to access the site:

    A PHP Error was encountered

    Severity: Warning

    Message: require_once(/www/fuel/application/../../fuel/modules/fuel/models/base_posts_model.php) [function.require-once]: failed to open stream: No such file or directory

    Filename: models/News_model.php

    Line Number: 3

    It looks like the site can't get to the right path of the file, in this case base_posts_model.

    And this is what inside the line number 3 of News_model:


    Is it something that occurs because the FUEL_PATH wrong path? or else?
    Hopefully anyone can help, thanks.
  • This sounds symptomatic of the casing of base_posts_model.php. FUEL 1.4 has the CI 3 which requires models, libraries and controllers to be upper cased to "Base_posts_model.php". If you are on say a Mac (like me), it doesn't care about casing and will work but as soon as you upload to a Unix environment, it will throw errors like that.
  • Actually the news module was generated via the cli, and in the News_model line number 3 is written by default like so: require_once(FUEL_PATH.'models/base_posts_model.php');
    Then I have to change it to this, and it works:

    Thanks for your time.
  • Thanks for the report. I've pushed a fix for that in the develop branch

Howdy, Stranger!

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