• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with Codeigniter HMVC on Linux Mint

#1
I seem to have trouble with hmvc when ever I start a new project. I follow the instructions to do the install of hmvc and I start with a clean or new codeigniter install but I always get  a 404 error page not found on this server. I have even copied a working codeigniter hmvc that was working but when I transfer to another Linux machine I get the same problem. I do not know if I have problem with permissions or something like that on Linux or if it is a codeigniter hmvc routing problem. i sure gets frustrating every time I start a new HMVC and I run into this problem. All thoughts and help greatly appreciated.  
Reply

#2
(07-13-2015, 10:25 AM)Codin2015 Wrote: I seem to have trouble with hmvc when ever I start a new project. I follow the instructions to do the install of hmvc and I start with a clean or new codeigniter install but I always get  a 404 error page not found on this server. I have even copied a working codeigniter hmvc that was working but when I transfer to another Linux machine I get the same problem. I do not know if I have problem with permissions or something like that on Linux or if it is a codeigniter hmvc routing problem. i sure gets frustrating every time I start a new HMVC and I run into this problem. All thoughts and help greatly appreciated.  

First check all controllers and models have first letter on class and file name as upper case.

Second in routes.php

$route['controller'] = "module/controller/function";

if have not removed index.php in config settings and htaccess on main directory

then url should include the index.php http://localhost/ptoject/index.php/controller

Note the latest HMVC only works on codeigniter 3 versions.
Reply

#3
Also make sure that you set your base_url in your config.php file and add this to the bottom of it.

PHP Code:
/*
|--------------------------------------------------------------------------
| HMVC Module paths
|--------------------------------------------------------------------------
|
*/
$config['modules_locations'] = array(
    
APPPATH.'modules/' => '../modules/',
); 

Another thing that cause this is your uri protocol, try using a different one.

PHP Code:
$config['uri_protocol']    = 'REQUEST_URI'
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply

#4
(07-14-2015, 10:34 AM)InsiteFX Wrote: Also make sure that you set your base_url in your config.php file and add this to the bottom of it.

PHP Code:
/*
|--------------------------------------------------------------------------
| HMVC Module paths
|--------------------------------------------------------------------------
|
*/
$config['modules_locations'] = array(
    
APPPATH.'modules/' => '../modules/',
); 

Another thing that cause this is your uri protocol, try using a different one.

PHP Code:
$config['uri_protocol']    = 'REQUEST_URI'

still problem is same it getting 404 error on linux web.
Reply

#5
If this problem is not get resolve soon then i have to find substitute framework script. for my website. Because it working well in local window machine, but not working on linux local as well as web machine after making required changes.
Reply

#6
Works fine on my local and live Linux website.

And for your information it is not part of CodeIgniter it is a third party add on.

Sounds like you are not configuring it right.
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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