• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why do website not show after uploaded to host?

#1
Photo 
I has used FileZilla upload all source code of website to host, has imported database successfully, and deleted file default.php in folder public_html , but when I enter the website address, it only shows file welcome.php like this:
Welcome to CodeIgniter!
The page you are looking at is being generated dynamically by CodeIgniter.
If you would like to edit this page you'll find it located at:
application/views/welcome_message.php
The corresponding controller for this page is found at:
application/controllers/welcome.php
If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.

After I set ../application/config/routes.php like this :
PHP Code:
$route['default_controller'] = "cHome"
cHome is controller of home page of website, it shows error like this :
404 Page Not Found

The page you requested was not found.

I've replaced the other controllers on it but still have the same result, try site_url() or base_url() function, it shows error like this function is not defined. Source I uploaded not to modify configuration anything. I don't understand why. Everybody help me. Thanks!
Reply

#2
Your should check out your configurations (are your using 'index.php' in your url) I think you should write chome instead of cHome, some server are case sensitive.

Is your website working on local server ?
NexoPOS 2.6.2 available on CodeCanyon.
Reply

#3
(06-12-2015, 08:10 AM)myfaith237 Wrote: I has used FileZilla upload all source code of website to host, has imported database successfully, and deleted file default.php in folder public_html , but when I enter the website address, it only shows file welcome.php like this:
Welcome to CodeIgniter!
The page you are looking at is being generated dynamically by CodeIgniter.
If you would like to edit this page you'll find it located at:
application/views/welcome_message.php
The corresponding controller for this page is found at:
application/controllers/welcome.php
If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.  

After I set ../application/config/routes.php like this :



PHP Code:
$route['default_controller'] = "cHome"  
cHome is controller of home page of website, it shows error like this :
404 Page Not Found

The page you requested was not found.

I've replaced the other controllers on it but still have the same result, try site_url() or base_url() function, it shows error like this function is not defined. Source I uploaded not to modify configuration anything. I don't understand why. Everybody help me. Thanks!


I would change the controller to some thing like Chome.php

PHP Code:
<?php

class Chome extends CI_Controller {
 
  public function index() {
 
  }



Then routes $route['default_controller'] = "chome";

or

$route['default_controller'] = "chome/index";
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply

#4
(06-13-2015, 08:13 AM)Blair2004 Wrote: Your should check out your configurations (are your using 'index.php' in your url) I think you should write chome  instead  of cHome, some server are case sensitive.

Is your website working on local server ?

Here is my configurations in file config.php :
PHP Code:
$config['base_url']    = 'http://nhacchonloc.zz.mu';
$config['index_page'] = '';
$config['uri_protocol']    = 'AUTO';
... 
I'm using free host of Hostinger,domain is 'http://nhacchonloc.zz.mu'. I changed 'cHome' to 'chome' as the same that you said, or changed
PHP Code:
$config['index_page'] = ''
to 
PHP Code:
$config['index_page'] = 'index.php'


but the result still was not changed anything. 
When I entered the address URL is 'nhacchonloc.zz.mu/index.php/cHome', home page was showed, but when I redirected to the other page, any the page,  it showed "error_404?"
Reply

#5
(06-13-2015, 09:11 PM)riwakawd Wrote:
(06-12-2015, 08:10 AM)myfaith237 Wrote: I has used FileZilla upload all source code of website to host, has imported database successfully, and deleted file default.php in folder public_html , but when I enter the website address, it only shows file welcome.php like this:
Welcome to CodeIgniter!
The page you are looking at is being generated dynamically by CodeIgniter.
If you would like to edit this page you'll find it located at:
application/views/welcome_message.php
The corresponding controller for this page is found at:
application/controllers/welcome.php
If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.  

After I set ../application/config/routes.php like this :




PHP Code:
$route['default_controller'] = "cHome"  
cHome is controller of home page of website, it shows error like this :
404 Page Not Found

The page you requested was not found.

I've replaced the other controllers on it but still have the same result, try site_url() or base_url() function, it shows error like this function is not defined. Source I uploaded not to modify configuration anything. I don't understand why. Everybody help me. Thanks!


I would change the controller to some thing like Chome.php


PHP Code:
<?php

class Chome extends CI_Controller {
 
  public function index() {
 
  }



Then routes $route['default_controller'] = "chome";

or

$route['default_controller'] = "chome/index";

My controller cHome.php like this :
PHP Code:
class CHome extends CI_Controller{
 
   public function __construct() {
 
       parent::__construct();
 
   }
 
    
    public 
function index(){
    ...
    }

Regardless I configured file routes.php like this :
PHP Code:
$route['default_controller'] = "cHome"
or 
PHP Code:
$route['default_controller'] = "chome"

the result was still not changed.
Reply

#6
Controller file/class names are supposed to be ucfirst, i.e. Chome.php, not cHome.php or chome.php.

You might be able to get away with CHome.php, but I wouldn't depend on it.

In most cases, the names in the configuration files can be all lowercase.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.