CodeIgniter Forums
Problem Hosting CodeIgniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Problem Hosting CodeIgniter (/showthread.php?tid=58311)



Problem Hosting CodeIgniter - El Forum - 06-01-2013

[eluser]if11074[/eluser]
I have upload all file into the file hosting, but I have a problem which is the page was not found. Whereas I had copy all the file into folder public_html cpanel.

Here is my address :

http://cerahmakmur.com/

any body help me please....


Problem Hosting CodeIgniter - El Forum - 06-03-2013

[eluser]Johan N.[/eluser]
Hi, did you check the base_url parameter in the config file?


Problem Hosting CodeIgniter - El Forum - 06-03-2013

[eluser]if11074[/eluser]
here is my base_url :

Code:
$config['base_url'] = 'http://www.cerahmakmur.com/';

before base_url above, I had try also this :

Code:
$config['base_url'] = 'http://cerahmakmur.com/';

but nothing be succesful,




Problem Hosting CodeIgniter - El Forum - 06-03-2013

[eluser]Johan N.[/eluser]
Are you using a .htaccess file? maybe you have any redirection there, also check your default controller in routes.php


Problem Hosting CodeIgniter - El Forum - 06-03-2013

[eluser]if11074[/eluser]
No, I dont use .htaccess, I had deleted the file. so, my index_page like below :

Code:
$config['index_page'] = 'index.php';

here is my default controller :
Code:
$route['default_controller'] = "UserController";

here is my Gallery controller :

Code:
<?php
class Gallery extends CI_Controller{

function Gallery(){
  parent::__construct();
  $this->load->helper('url');
  $this->load->library('session');
}
function index(){
   $this->load->model('MGallery');

  if($this->input->post('upload')){
   $this->MGallery->do_upload();
  }
  $data['images'] = $this->MGallery->get_images();
  $this->load->view('home_view',$data);
}
}



Problem Hosting CodeIgniter - El Forum - 06-03-2013

[eluser]Johan N.[/eluser]
You say that your default controller is UserController but then show one called Gallery, maybe you are calling the wrong controller? Anyways the problem should be in the index() function of UserController, check there


Problem Hosting CodeIgniter - El Forum - 06-03-2013

[eluser]if11074[/eluser]
I have changed the default controller to be :

Code:
$route['default_controller'] = "Gallery";

but no any changed...






Problem Hosting CodeIgniter - El Forum - 06-03-2013

[eluser]Johan N.[/eluser]
Ok, i think we are close to solve this.

First you need to change:
Code:
$route['default_controller'] = "Gallery";

For:
Code:
$route['default_controller'] = "gallery";

Then if you go to your site you will see a database error (i tried with http://cerahmakmur.com/index.php/gallery), you should only need to set up your database.


Problem Hosting CodeIgniter - El Forum - 06-03-2013

[eluser]if11074[/eluser]
I had change it...

thank you for your kind...

once again I wanna say thank you Smile