Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9053123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:20:58+00:00 2026-06-16T13:20:58+00:00

I am new to Codeigniter. While trying to access controller specific method, I am

  • 0

I am new to Codeigniter. While trying to access controller specific method, I am getting ‘Object Not found‘ exception.

Before hitting the url I did following changes:

  • base_url set as http://localhost/test/ in config.php
  • default_controller set as main
  • Defined index and login method in main.php class

If I try to hit just http://localhost/test/, it returns echo from the index method. But if I directly give http://localhost/test/main/login then it throws Object not found exception.
Strangely if I give $this->login(); into index method of main controller class, http://localhost/test/hits the login method. I have tried to change login method to public but no luck.
What I am missing here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T13:20:59+00:00Added an answer on June 16, 2026 at 1:20 pm

    It seems to be the common index.php problem

    This should do it: http://ellislab.com/codeigniter/user-guide/general/urls.html

    But please confirm it by trying to access the controller with a index.php in behind it like so:

    http://localhost/test/index.php/main/login
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to codeigniter. While submitting the form i am getting 404 error
I'm really new to CodeIgniter and am having some trouble getting started. I see
I just started using CodeIgniter after using Zend for a while. My new site
I'm new to codeigniter, and I'm trying to figure out how to implement a
I'm quite new to CodeIgniter and I'm trying to re-use the $data I pass
i have download the new codeigniter 2.0 and put my controller,model and view files
I am really new to CodeIgniter. I am trying to setup a website where
I'm fairly new to CodeIgniter, and am trying to figure out something I feel
new to CodeIgniter and MVC/OOP as well. My current problem that I am trying
i am new in codeigniter. And i am trying to get field name of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.