CodeIgniter Forums

Full Version: Problem with controller
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]oualid[/eluser]
Hi.

I am using CI version 1.7.2 and I am developing a site since some weeks.
Suddenly when I create a new controller file under the controllers/ folder and I open the file in the browser I get the following error:

404 Page Not Found
The page you requested was not found.


The controller file does exist but I still get the error.

All the other controller files that I created earlier work fine.

In a new CI installation I copied the welcome.php file to welcome2.php

The browswer finds welcome but not welcome2.

The log show the following:

For controller/welcome.php

http://192.168.0.10/CodeIgniter/welcome

Code:
DEBUG - 2010-07-16 14:28:44 --> Config Class Initialized
DEBUG - 2010-07-16 14:28:44 --> Hooks Class Initialized
DEBUG - 2010-07-16 14:28:44 --> URI Class Initialized
DEBUG - 2010-07-16 14:28:44 --> Router Class Initialized
DEBUG - 2010-07-16 14:28:44 --> Output Class Initialized
DEBUG - 2010-07-16 14:28:44 --> Input Class Initialized
DEBUG - 2010-07-16 14:28:44 --> Global POST and COOKIE data sanitized
DEBUG - 2010-07-16 14:28:44 --> Language Class Initialized
DEBUG - 2010-07-16 14:28:44 --> Loader Class Initialized
DEBUG - 2010-07-16 14:28:44 --> Controller Class Initialized
DEBUG - 2010-07-16 14:28:44 --> File loaded: /var/www/CodeIgniter/system/application/views/welcome_message.php
DEBUG - 2010-07-16 14:28:44 --> Final output sent to browser
DEBUG - 2010-07-16 14:28:44 --> Total execution time: 0.0212

For controller/welcome2.php

http://192.168.0.10/CodeIgniter/welcome2

404 Page Not Found
The page you requested was not found.


Code:
DEBUG - 2010-07-16 14:29:25 --> Config Class Initialized
DEBUG - 2010-07-16 14:29:25 --> Hooks Class Initialized
DEBUG - 2010-07-16 14:29:25 --> URI Class Initialized
DEBUG - 2010-07-16 14:29:25 --> Router Class Initialized
DEBUG - 2010-07-16 14:29:25 --> Output Class Initialized
DEBUG - 2010-07-16 14:29:25 --> Input Class Initialized
DEBUG - 2010-07-16 14:29:25 --> Global POST and COOKIE data sanitized
DEBUG - 2010-07-16 14:29:25 --> Language Class Initialized
ERROR - 2010-07-16 14:29:25 --> 404 Page Not Found --> welcome2/index

I removed index.php from Codeigniter URL.

Any suggestion??

Regards.

El Forum

[eluser]danmontgomery[/eluser]
Did you change the class name to match the new file name? Post some code.

El Forum

[eluser]oualid[/eluser]
Of course!!!

I forgot to change the class name!!

It works now.

Thanks!!