Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8323001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:34:37+00:00 2026-06-08T23:34:37+00:00

First sorry, but im a really big beginner, so you can down vote this

  • 0

First sorry, but im a really big beginner, so you can down vote this question if you feel like.

So i went over lots of tutorials, and the only thing what would work for me is to pull the public folder content out.

And the problem is i get a bunch of errors.

error:

Warning: require(\bootstrap.php) [function.require]: failed to open stream: No such file or directory in C:\EasyPHP\www\fuelphp\index.php on line 33

Fatal error: require() [function.require]: Failed opening required '\bootstrap.php' (include_path='.;C:\php\pear') in C:\EasyPHP\www\fuelphp\index.php on line 33

so i discovered that the DOCROOT is C:\EasyPHP\www\fuelphp\, so i will need to pull stuff in this way localhost/fuelphp/fuel/core

the original index looks like this

<?php
/**
 * Set error reporting and display errors settings.  You will want to change these when in production.
 */
error_reporting(-1);
ini_set('display_errors', 1);

/**
 * Website document root
 */
define('DOCROOT', __DIR__.DIRECTORY_SEPARATOR);

/**
 * Path to the application directory.
 */
define('APPPATH', realpath(__DIR__.'/../fuel/app/').DIRECTORY_SEPARATOR);

/**
 * Path to the default packages directory.
 */
define('PKGPATH', realpath(__DIR__.'/../fuel/packages/').DIRECTORY_SEPARATOR);

/**
 * The path to the framework core.
 */
define('COREPATH', realpath(__DIR__.'/../fuel/core/').DIRECTORY_SEPARATOR);

// Get the start time and memory for use later
defined('FUEL_START_TIME') or define('FUEL_START_TIME', microtime(true));
defined('FUEL_START_MEM') or define('FUEL_START_MEM', memory_get_usage());

// Boot the app
require APPPATH.'bootstrap.php';

// Generate the request, execute it and send the output.
try
{
    $response = Request::forge()->execute()->response();
}
catch (HttpNotFoundException $e)
{
    $route = array_key_exists('_404_', Router::$routes) ? Router::$routes['_404_']->translation : Config::get('routes._404_');
    if ($route)
    {
        $response = Request::forge($route)->execute()->response();
    }
    else
    {
        throw $e;
    }
}

// This will add the execution time and memory usage to the output.
// Comment this out if you don't use it.
$bm = Profiler::app_total();
$response->body(
    str_replace(
        array('{exec_time}', '{mem_usage}'),
        array(round($bm[0], 4), round($bm[1] / pow(1024, 2), 3)),
        $response->body()
    )
);

$response->send(true);

than modified to this

<?php
/**
 * Set error reporting and display errors settings.  You will want to change these when in production.
 */
error_reporting(-1);
ini_set('display_errors', 1);

/**
 * Website document root
 */
define('DOCROOT', '/');

/**
 * Path to the application directory.
 */
define('APPPATH', 'fuel/app/').DIRECTORY_SEPARATOR;

/**
 * Path to the default packages directory.
 */
define('PKGPATH', 'fuel/packages/').DIRECTORY_SEPARATOR;

/**
 * The path to the framework core.
 */
define('COREPATH', 'fuel/core/').DIRECTORY_SEPARATOR;

// Get the start time and memory for use later
defined('FUEL_START_TIME') or define('FUEL_START_TIME', microtime(true));
defined('FUEL_START_MEM') or define('FUEL_START_MEM', memory_get_usage());

// Boot the app
require APPPATH.'bootstrap.php';

// Generate the request, execute it and send the output.
try
{
    $response = Request::forge()->execute()->response();
}
catch (HttpNotFoundException $e)
{
    $route = array_key_exists('_404_', Router::$routes) ? Router::$routes['_404_']->translation : Config::get('routes._404_');
    if ($route)
    {
        $response = Request::forge($route)->execute()->response();
    }
    else
    {
        throw $e;
    }
}

// This will add the execution time and memory usage to the output.
// Comment this out if you don't use it.
$bm = Profiler::app_total();
$response->body(
    str_replace(
        array('{exec_time}', '{mem_usage}'),
        array(round($bm[0], 4), round($bm[1] / pow(1024, 2), 3)),
        $response->body()
    )
);

$response->send(true);

now the public is not in the url, but im getting a bunch of errors when i open the site, i see insted of a forward slash uts a back slash, but cant really find the problem

Warning: require_once(fuel/core/classes\error.php) [function.require-once]: failed to open stream: No such file or directory in C:\EasyPHP\www\fuelphp\fuel\core\base.php on line 25

Fatal error: require_once() [function.require]: Failed opening required 'fuel/core/classes\error.php' (include_path='.;C:\php\pear') in C:\EasyPHP\www\fuelphp\fuel\core\base.php on line 25

could please someone give me a hint how to modify the index to be all okay?

thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:34:39+00:00Added an answer on June 8, 2026 at 11:34 pm

    You shouldn’t need to modify the index file in order to achieve what you’re attempting.

    Fuel is designed to reside above the document root (docroot). Your docroot appears to be www/.

    This means that your directory structure should in fact be as follows:

    C:\EasyPHP\fuelphp\
    C:\EasyPHP\www\
    

    The FuelPHP zip file or git clone (or however you may obtain it) contains a folder entitled public. This folder is the assumed name of your docroot, and therefore in your situation the contents of public/ should be copied into www/

    You can however set it up all inside the docroot as you’re attempting and the process is documented on the FuelPHP website here.

    As explained in point 3, for security reasons it is strongly advised
    NOT to install Fuel inside your webserver’s document root.

    However, there are cases where you would like to do that, […]

    In that case, you need an additional .htaccess file that you need to place in your document
    root, which will redirect requests to the site root to your public
    folder, and also modifies the rewrites to include the public folder:

    <IfModule mod_rewrite.c>
        RewriteEngine on
    
        RewriteBase /public
    
        RewriteRule ^(/)?$ index.php/$1 [L]
    
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
    
        RewriteRule ^(.*)$ index.php/$1 [L]
    </IfModule>
    

    The default configuration of index.php takes into account the position of the /fuel/ folder by default. Take for example the following path definition

    define('COREPATH', realpath(__DIR__.'/../fuel/core/').DIRECTORY_SEPARATOR);
    
    __DIR__    - Path of current working directory, i.e. wherever index.php is
    ..         - go up a directory, i.e. directory above wherever index.php is
    fuel/      - Fuel folder
    core/      - Core folder within fuel/
    
    realpath() - Resolves the .. to it's real location and makes sure / is correct or changes to \ depending on the OS
    

    The reason you’re getting slashes of varying directions is because you’ve hardcoded / into the code without using realpath()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First sorry if its a stupid guestion but im a really big beginner. I
First of all, I want to say sorry for this very big question, but
First of all I'm sorry but I'm a really big beginner. I dont really
(I am sorry, I wanted to ask this question on meta first, but it
Sorry for asking a basic question like this but I've been reading on this
I am sorry if this is a really simple question but I am really
Hello first sorry if its a stupid question, but I amm a beginner, and
sorry for stupid question. But really interesting and incomprehensible. In this session discussed about
first sorry if its a stupid question but im lost a bit. So when
First of I'm very sorry but this questions is not so so specific. All

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.