Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Setup fuelphp on remote server
  • Hello,

    I have the following problem. When I try to move my fuelphp site to remote server I get:


    Fatal error: require() [function.require]: Failed opening required '/home/admin/domains/my.domain.com/fuelphp/fuel/app/bootstrap.php' (include_path='.:/usr/local/lib/php') in /home/admin/domains/my.domain.com/fuelphp/public/index.php on line 33


    error. My files structure is as follows:

    / domain
    ../ page
    ../../ fuel
    ../../ public
    ../ public_html 

    my.domain.com is symbolic linked from domain/public_html/my to domain/page/public

    What should I do in this case to make fuel working? Thank you for any advices.
  • You need to set the paths in your index.php (APPPATH, COREPATH and PKGPATH) correctly.

    By default they are calculated using relative paths based on the location of your index.php. Which no longer works if you symlink that path, but not the others...
  • Thanks for an answer.

    I've tried to change paths in index.php before but it didn't work or possibly I was doing it wrong. The path displayed by error in correct real path to the bootstrap.php file. After turning on warnings I also got permission denied warning: 


    Warning: require(/home/admin/domains/my.domain.com/fuelphp/fuel/app/bootstrap.php) [function.require]: failed to open stream: Permission denied in /home/admin/domains/my.domain.com/fuelphp/public/index.php on line 34



    If you could tell me how to exacly setup those paths I would be very grateful.
  • HarroHarro
    Accepted Answer
    There's nothing difficult about it:

    define('APPPATH', '/path/to/your/app/folder');

    If "/home/admin/domains/my.domain.com/fuelphp/fuel/app" is indeed the correct path then your server has a security setup that prevents the webserver from accessing that path. You have to take that up with your administrator or hosting company.
  • i try to define('APPPATH', '/path/to/your/app/folder');
    but still Fatal error: require():


  • The previous answer has a typo. All paths should end with a directory separator. So it should be

    define('APPPATH', '/path/to/your/app/folder/');

    both in your ./public/index.php and in your oil file (and possible in the phpunit files to if you intend to run unit tests).

Howdy, Stranger!

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

In this Discussion