Welcome Guest, Not a member yet? Register   Sign In
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

(This post was last modified: 07-14-2015, 08:39 AM by wolfgang1983.)

(07-13-2015, 09: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.
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply
#3

(This post was last modified: 07-14-2015, 09:37 AM by InsiteFX.)

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 CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

(07-14-2015, 09: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 CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB