FUEL_PATH define error

edited December 2017 in Modules
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:
require_once(FUEL_PATH.'models/base_posts_model.php');

Is it something that occurs because the FUEL_PATH wrong path? or else?
Hopefully anyone can help, thanks.

Comments

  • edited 2:24PM
    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.
  • edited 2:24PM
    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:
    require_once(FUEL_PATH.'models/Base_posts_model.php');

    Thanks for your time.
  • edited 2:24PM
    Thanks for the report. I've pushed a fix for that in the develop branch
Sign In or Register to comment.