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

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

(06-01-2016, 05:53 PM)cartalot Wrote: 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.

Hi cartalot, 

I understand your point of view. I thought making routing in CI3 and getting rid of .index.php should be quite straight forward and simple. I  thought I will learn something because there is not a lot of programming (just the confing file, routing and .htaccess) in making the website be routed nice and clean. It looks like it just doesn't work on my machine. I will try in a few hours to run my application and the CI3 framework on a Linux distribution, where I do have a LAMP server running on.
Reply
#22

(This post was last modified: 06-02-2016, 02:47 AM by bebetxx.)

I believe that CI3 routing system does not work properly with Wiredesignz HMVC. I can not make the CI3 routes to work properely without calling the ".index.php/route" in the URI (as I described before in my previous replies). If anyone has a ready to go CI3 framework with HMVC where the routes work properly, I will be more than glad to use it in my project because I can not the framework to work with my modules routes.

LE: the framework attached by InsiteFX has the same routing problem. On my machines the modules routes can not work without "http://localhost/index.php/route"
LEE: I tested this repository https://github.com/degt/Codeigniter-HMVC-example and on my machine I can not access http://localhost/signin/ I get the same 404 Not Found Error.
Reply
#23

(This post was last modified: 06-02-2016, 03:26 AM by InsiteFX. Edit Reason: Add Mod Rewrite statement )

It's not CodeIgniter 3.0.6 Like I said I have it running on Windows 10 Pro XAMPP PHP 5.6 and HMVC.

If you want to download and install Skype and TeamView I will take a look at your system configuration for you.

Are you sure that your mod rewrite is working? just put any text at the top of it and see if you get a Server 500 Error if not then it is not working.
What did you Try? What did you Get? What did you Expect?

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

For Everyone here is a HMVC installed and running (TESTED!) on CodeIgniter 3.0.6

First do the following:

Edit the Windows hosts file to add your own server:

C:\Windows\System32\drivers\etc

Click on the hosts file and open it with notepad.

Add below using your own server name.

localhost       server name
#127.0.0.1 ci306.dev

Add a virtual host in apache:

Under...

C:\xampp\apache\conf\extra

Create a new directory called vhosts

In this directory add a new vhosts.conf file.

NOTE: That the paths will change for your own paths.

Add this to the vhosts.conf file

# CI306 Development
<VirtualHost *:80>
    DocumentRoot "C:\xampp\htdocs\ci306hmvc\public_html"
    ServerName ci306.dev
    <Directory "C:\xampp\htdocs\ci306hmvc\public_html">
        Order allow,deny
        Allow from all
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Open the httpd-vhosts.conf file in this directory C:\xampp\apache\conf\extra

Add this line at the bottom of this file.

Include "conf/extra/vhosts/*.conf"

Now all you need to do to add your own servers is to add them to the new vhosts.conf file.


Download and extract ci306hmvc.zip to your htdocs directory.

ci306hmvc.zip


Setting up environment variables under Windows for PHP Development.

1) Open Control Panel

2) Click on System and Security

3) Click on System

4) On the left click on Advanced system settings

5) When the Dialog box shows click on the bottom button Environment Variables

6) In the System variables on the bottom edit the path variable and add the below paths

NOTE: make sure you end each path with a semi-colon ; Windows 10 handles this differently

Paths will be your own paths...

PHP path: 
C:\xampp\php;

XAMPP htdocs path:
C:\xampp\htdocs;

Global Git install path:
C:\Program Files (x86)\Git\bin;

Global Composer install path:
C:\ProgramData\ComposerSetup\bin;


Tested today and working!
What did you Try? What did you Get? What did you Expect?

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

(This post was last modified: 06-02-2016, 09:14 AM by bebetxx.)

Guys, I uploaded my CI3 localhost project on one of my web hosting services and surprisingly the routing in the HMVC works. Definitely the routing on my localhost does not work due to the apache settings. I am trying tomorrow to install a new and different version of apache. I used the "Vertrigo" AMP distribution and I am looking to install xamp on Windows.
Reply
#26

If you install XAMPP make sure you install it to c:\ the root of your hard disk
What did you Try? What did you Get? What did you Expect?

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

Very interesting report I have for you guys. I installed XAMP and I moved my CI3 project over there. When I try to access the link http://localhost/route_HMVC/ it still gives me the 404 error.

I changed the C:\Windows\System32\drivers\etc\hosts file
Introducing "#127.0.0.1 ci306.dev"

and when I access the webserver link http://127.0.0.1/route_HMVC/ under XAMPP server everything works. I am very happy with this!

I tried also in Vertrigo, but it still gives me the 404 error. On XAMPP it works perfectly.

Thanks!
Reply
#28

(This post was last modified: 06-03-2016, 09:41 AM by InsiteFX. Edit Reason: added mapping info )

You very welcome.

Thinking about this more made me remember that I also had to make some editor configuration too.

I use phpStorm 2016.1.2 and had to add a mapping to the public_html directory for it to find the index.php file.
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