Welcome Guest, Not a member yet? Register   Sign In
Problem setting routes in HMVC
#11

(This post was last modified: 06-01-2016, 12:39 PM by bebetxx.)

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.
Reply
#12

(This post was last modified: 06-01-2016, 01:06 PM by InsiteFX.)

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'
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#13

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
Reply
#14

It's not CI Read above, I have it working fine under Windows 10 XAMPP CI 3 and HMVC
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#15

(This post was last modified: 06-01-2016, 01:24 PM by bebetxx.)

(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.
Reply
#16

(This post was last modified: 06-01-2016, 01:45 PM by InsiteFX.)

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
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#17

I use Vhosts so no localhost here
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#18

(This post was last modified: 06-01-2016, 02:07 PM by bebetxx.)

(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.
Reply
#19

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.
Reply
#20

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.
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