CodeIgniter Forums
Problem setting routes in HMVC - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: Problem setting routes in HMVC (/showthread.php?tid=65324)

Pages: 1 2 3


RE: Problem setting routes in HMVC - bebetxx - 06-01-2016

Thank you guys for trying help me out. Everything I do is not working with Routing. What is the problem? Mean while I removed the sub-folder(i thought this was the problem, but still is not working) I can access the following links: http://localhost/index.php/login http://localhost/index.php/awesome
but when I want to access http://localhost/login and http://localhost/awesome I get Not Found The requested URL /login/ was not found on this server.

Here is my repository: https://github.com/ibudisteanu/PHP-TESTS
Please I really appreciate your input trying to fix it. I got stuck in the last week with this routing problem.


RE: Problem setting routes in HMVC - InsiteFX - 06-01-2016

That's telling me that it is still for some reason trying to find and load index.php

Looking at your MY_Controller you are missing this line at the top:

PHP Code:
require APPPATH.'third_party/MX/Controller.php'



RE: Problem setting routes in HMVC - bebetxx - 06-01-2016

I have absolutely no idea to debug the CI3 framework yet. Every second makes me more dissapointed about CI3 because of these two major reasons: 1) they don't have a separate branch for having HMVC already included in the framework, 2)if something does not work, you just cry hoping for a divine solution to make it work. Really I can not spend one week fixing the CI3 routing system...

any practical solution? Thanks


RE: Problem setting routes in HMVC - InsiteFX - 06-01-2016

It's not CI Read above, I have it working fine under Windows 10 XAMPP CI 3 and HMVC


RE: Problem setting routes in HMVC - bebetxx - 06-01-2016

(06-01-2016, 01:08 PM)InsiteFX Wrote: It's not CI Read above, I have it working fine under Windows 10 XAMPP CI 3 and HMVC

I have done that change and still it is not working(same results). I am using Windows7, Vertrigo 

Packages:
  • Apache 2.4.20

  • PHP 5.6.21

  • MySQL 5.7.12

  • Smarty 3.1.29

  • SQLite 3.12.2

  • PhpMyAdmin 4.6.1

  • Xdebug 2.4.0

I have updated my Github repository with a commit that includes your suggestion. The repository has the same behavior(errors) on my localhost like before.


RE: Problem setting routes in HMVC - InsiteFX - 06-01-2016

Here is a complete HMVC setup you will need to set the base_url and keep the directory structure.

You will also find some other things in there.


CI 3.0.6 HMVC


RE: Problem setting routes in HMVC - InsiteFX - 06-01-2016

I use Vhosts so no localhost here


RE: Problem setting routes in HMVC - bebetxx - 06-01-2016

(06-01-2016, 01:46 PM)InsiteFX Wrote: I use Vhosts so no localhost here

I did a fast test and I still have the same exact outputs with your sample code.

LE: only one line of code to POC and it still not work:

I introduced the following route:
PHP Code:
 $route['test2'] = 'welcome'


Then when I access
The urls with http://localhost/public_html/ works http://localhost/public_html/index.php/test2/ works but the urls without /index.php/ like this http://localhost/public_html/test2 does NOT work. It drives me crazy.


RE: Problem setting routes in HMVC - cartalot - 06-01-2016

hi - with all due respect - you should really learn the framework first. its like you want to climb a mountain, but you don't know how to hike yet. so its going to be frustrating and you will just get blisters on your feet.

spend some quality time with the codeigniter manual. do the tutorial in the manual - don't just skim it, actually build everything to the point where you really understand it all. then go after the mountain.


RE: Problem setting routes in HMVC - InsiteFX - 06-01-2016

I started hmvc on windows 7 pro, I had to set the php environment variables for it, I will post tomorrow how to set the environment variables and how to set the localhost in windows.