New Install - 404 error /fuel/dashboard

Hello,
I downloaded the 1.5.2 version of FuelCMS. Installed it locally and also tried on a web server. Both local and web server receiving a 404 page not found.

locally running MAMP with PHP 7.4.21.
Edited the Database.php file pointing at the mysql DB. config.php, with:
$config['base_url'] = 'http://localhost/';
$config['index_page'] = 'index.php';

MY_config.php has:
$config['admin_enabled'] = TRUE;
$config['fuel_mode'] = 'auto';

.htaccess is the default file in the zip file.

But when trying to access the site: http://localhost/fuel

there is a redirect to : http://localhost/index.php/fuel/dashboard. But with a 404 error.

I have tried commenting out each line in the .htaccess file and everything I can think of, but I can't get it to work. thought the default install would not be any issue, but I guess I was wrong.

Any help would be appreciated.

Comments

  • Are you able to go to http://localhost/index.php/fuel/login? For http://localhost/fuel/login to work, the config needs to have $config['index_page'] = ''; and the .htaccess needs to be what came in the original zip. Also, Apache needs to have .htaccess files enabled (which they usually are).

  • Also check Apache has mod_rewrite installed and enabled. Use phpinfo() to check.

  • Hello,
    both URLs above get a 404 error.

    the .htaccess file is the default file from the zip file.
    changes in the .htaccess file affect the operation of apache, so I would assume that .htaccess is enabled.

    As well as the config file being used is the default of what is in the zip file.

    default is:
    $config['base_url'] = BASE_URL;
    $config['index_page'] = '';

    also tried:
    $config['base_url'] = 'http://localhost/';
    $config['index_page'] = 'index.php';

    Both giving a 404 error.

    confirmed with phpinfo(), that mod_rewrite is loaded.

  • Does http://localhost/index.php/home work?

  • yes that works and I followed the steps listed on this page.

  • but all other pages get the 404

  • If you add a page called test.php with some text like "test" in it in fuel/application/views folder does http://localhost/test appear?

  • I got a 404 error

  • edited October 3

    Ok. It sounds like there is a problem with .htaccess. Have you tried adding a question mark at the end of index.php as in the following in the .htaccess?

    ...
        RewriteRule .* index.php?/$0 [L]
    ...
    

    https://www.codeigniter.com/userguide3/installation/troubleshooting.html

  • yes I have tried this with the ? and without the ?

    from: RewriteRule .* index.php/$0 [L]
    to: RewriteRule .* index.php?/$0 [L]

    also tried putting the ? in the config.php file as well.
    from: $config['index_page'] = "index.php";
    to: $config['index_page'] = "index.php?";

    I have also tried different versions of PHP as well. 7.4.21 and 8.0.8. But trying to access anything in the fuel directory gives the 404 error.

  • It sounds like the only page that appears is the homepage/installation page correct and not even the test view you created above shows up (neither http://localhost/test OR http://localhost/index.php/test)? Does the offline page appear at http://localhost/offline OR http://fuel-test.test/index.php/offline?

  • http://localhost/index.php/test - receives 404

    http://localhost/offline - receives
    The site is currently offline.
    Please try again later.

    I created a test.php in the root with phpinfo() in it. This loads.
    http://localhost/test.php

  • The test page should be in the fuel/application/views folder (with content in it).

  • edited October 3

    I removed the content in the fuel/application/views folder. So that the test.php file it is a blank file.
    but still get the 404 error

  • Put some content in that file and see if it is still a 404 error. I'm trying to determine if you have an .htaccess file or something else is going on.

  • I put some content in the test.php file and still gets the 404 error.
    below is what is in the .htaccess file.

    Options +SymLinksIfOwnerMatch


    RewriteEngine On
    RewriteBase /

    <Files .*>
        Order Deny,Allow
        Deny From All
    </Files>
    
    # Allow asset folders through
    RewriteRule ^(fuel/modules/(.+)?/assets/(.+)) - [L]
    
    # Protect application and system files from being viewed
    RewriteRule ^(fuel/install/.+|fuel/crons/.+|fuel/data_backup/.+|fuel/codeigniter/.+|fuel/modules/.+|fuel/application/.+) - [F,L]
    
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    RewriteRule .* index.php?/$0 [L]
    
    # Prevents access to dot files (.git, .htaccess) - security.
    RewriteCond %{SCRIPT_FILENAME} -d
    RewriteCond %{SCRIPT_FILENAME} -f
    RewriteRule "(^|/)\." - [F]
    


    Options -Indexes

  • You may need to go code diving into the /fuel/codeigniter/core/CodeIgniter.php file to see where the 404 is being triggered. Not sure what is going on since you can see the fuel/application/views/offline.php page but you can't see the fuel/application/views/test.php page. You should be be able to put any view file with content that has a file name not preceded with an underscore in the views folder and it should render barring there isn't a controller/method with the same name intercepting it ($config['fuel_mode'] = 'auto'; should be set too which it looks like it is above).

Sign In or Register to comment.