Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

874
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda