Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

876
Views
CodeIgniter project not work on Linux-based remote server

I developed a project with CodeIgniter on windows XAMPP which works. But does not work on Linux-based remote server.

I get the error:

Unable to load the requested file: home.php

Controller: home.php:

public function index(){
  $this->load->view('home');
}

.htaccess:

RewriteEngine on
RewriteCond $1 !^(index\\.php|resources|robots\\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

On codeIgniter 3 + versions a couple of checks to do if getting errors below.


  • error 404 page not found
  • Unable to load the requested file

Check first.

  • Make sure your file name has the first letter upper case only
  • Make sure your class name has first letter upper case only
  • This applies for models as well.

Warning: Some times even though lower case may work on some localhost some other operating systems it may cause error when file or class are lower case, it may not be the same for everyone.

Controller

File name: Home.php

<?php

class Home extends CI_Controller {

     public function __construct() {
        parent::__construct();
        $this->load->model('model_example');
     }

     public function index(){
        // $data['results'] = $this->model_example->get_results();
        $this->load->view('home');
     }
}

Folder Structure for View

application

application > views > home.php

Models

File name: Model_example.php

<?php

class Model_example extends CI_Model {

    public function get_results() {
      // Some Code Here.
    }
}

On your config.php

$config['base_url'] = 'http://localhost/your_project_name/';
over 4 years ago · Santiago Trujillo Report

0

Rather than uploading the codeigniter site directly you should be able to use something like Putty (http://www.putty.org/) to install a fresh version of Codeigniter through script and then add the files for your site to the installation.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html

The script used to install a fresh version of CI will differ based on what Linux platform you're using. wget is used for ubuntu.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!