Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
change fuel core path
  • Hi,

    hi just downloaded 1.7.2 to upgrade my app and i want no move core folder two directories up but when i do and i update public/index.php with

    define('COREPATH', realpath(__DIR__.'/../../core/').DIRECTORY_SEPARATOR);

    but I get the error:
    Composer is not installed. Please run "php composer.phar update" in the root to install Composer

    I run the comand but still same error. i am not expirenced with composer. can anyone help?
  • i have to move vendors to the same level as core folder or change bootstrap.php inside core folder.

    if i may ask why is vendors path not defined in index.php in public folder as the other defines?
  • HarroHarro
    Accepted Answer
    VENDORPATH is defined relative to COREPATH:

    defined('VENDORPATH') or define('VENDORPATH', realpath(COREPATH.'..'.DS.'vendor').DS);

    So there should be no reason to change this if you have moved the core to another location. All our production installs run of a single shared core installation without problems. Note that 'vendor' is considered a part of the core to, Fuel is designed to have them installed together.

    You get that error if

    if ( ! is_file(VENDORPATH.'autoload.php'))

    is true, so you need to check if you have moved the vendor path too.

    If you don't want to move that, you need to define the VENDORPATH in your index.php too, that is not a problem. It is not there by default because nobody ever changes it, so it would only introduce clutter. But you can define it there without problems.
  • got it. thanks

Howdy, Stranger!

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

In this Discussion