• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] CI Tutorial Static Page -not recognizing controller- help

Hi all, 

background info
CI version : CI 3.1.6
Host : Raspberrypi3 running debian jessie/Apache2.4/MySQL 

I stumbled across what will appear as a humble mistake, but god for the life of me I just couldn't figure it out yet. hopefully by sharing in this forum, I'll get somewhere with my first step to CI and its goodies ... 

I'm following the tutorial from CI's https://www.codeigniter.com/user_guide/t...pages.html and basically creating new controller Pages and its related function/templates/pages/etc

Problem is when I hit my server http://localhost/codeigniter/pages/view, server doesn't seem to recognize that indeed there is the controller
called Pages, hence 404 ( and not the CI's 404 rendition )

Seem like a simple problem 

I have : 

  1. set base_URL to be : 'localhost/codeigniter/' ( yes, for time being the application name is codeigniter )
    i've tried various like : localhost, http://localhost/codeigniter/, http://localhost/codeigniter, http://localhost. doesn't seem to budge
  2. how do you turn on debug or get CI spit out error message in the log ? does it go to apache2/error.log at all ? 
  3. At this point of the tutorial, do I need to turn the rewrite_mod yet and modify the default .htaccess to include rewrite rules ?
Thanks guys

I just need to get over this obstacle to start learning and applying CI to my web application. I'm moving away from building things from scratch and going to utilize more of CI's library and helper function

Did you setup your Routes file?

Did you setup your config base_url?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

(12-08-2017, 06:08 AM)InsiteFX Wrote: Did you setup your Routes file?

--> I'd have thought this where the problem lies. but the tutorial section did not mention anything about route until about later section. I haven't got to that part yet. so my assumption is that by following the tutorial, it should have been working. 

Did you setup your config base_url?

--> yupe, I tried various combination. See my first post. Doesn't seem to affect. I also have restarted apache2/php and enable disable mod rewrite. I don't think it's base_url type of problem yet

We can close this thread. I just revisited and it's working. Not sure what little changes I made. but it's great now. Cheers

Just edit your topic header and add [SOLVED]
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

great one. doing it

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

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