Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to sub sub module?
  • Hi,

    how to sub sub module?

    example;
    mobules/site/classes
    -------------------views
    -------------------/modules/blog/classes
    ----------------------------------------views

    Try,
    Request::active()->add_path(APPPATH.'modules/site/modules'.DS); // not working.
    What do I need?
  • HarroHarro
    Accepted Answer
    It's doesn't get a first price in a beauty contest, but what you should to is define ./mobules/site/modules as a module path in your application config file.

    After that, the blog module should work without problems.

    Request::add_path() adds paths to the Finder, which is used to load files (config, lang, other files) only.
  • Oke thank you.

    problem resolved.

    'module_paths' => array(
    DOCROOT.'third_party'.DS,
    DOCROOT.'third_party'.DS.'site/extensions'.DS
    ),
  • DOCROOT? Ideally you shouldn't have code inside your docroot, for security reasons...
  • I'm using DOCROOT.

    My fuelphp framework directory schema is;
    /app
    /fuelphp
    /third_party - modules path.
    index.php - not be public folder...

    Does creating a security hole?
  • DOCROOT is normailly your webserver's document root. The idea behind the default fuelphp folder structure is that you map your webserver's document root to the public folder, so all your code is outside the document root.

    If it is inside the document root, files can be requested by the browser. If your application has a security hole, that will open the way for a hacker to place executable code on your system, that can be activated remotely.
  • I'm using cPanel, what is your suggestion?
  • I don't know cPanel, so I don't know what is possible and what not.

    If you can't control your document root location, you have to resort to installing everything in the docroot, no other option.

    In that case I would leave the ./fuel folder, and put everything in there (originally, it already is), and add an .htaccess with a deny all, to prevent access to everything in /fuel.
  • If you are creating subdomain, then it is easy: point your subdomain to /home/MYUSER/sites/site1/public and place your fuel instance in /home/MYUSER/sites/site1/.

    If it is your main domain, delete your /home/MYUSER/public_html directory and create a symbolic link to /home/MYUSER/sites/site1/public, and do the same as above.

    I hate cPanel, but I thank god, that this ugly workaround works.

Howdy, Stranger!

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

In this Discussion