Welcome Guest, Not a member yet? Register   Sign In
Crazy problem: controllers don't load
#1

[eluser]swissbastian[/eluser]
Hi there

I've got a very strange problem. Have updated CI to version 1.6.2. Worked all fine. Now the page doesn't load the controllers. I always get the index page, means CI always loads the index controller and the index function there. If I change the index controller in routes.php to any other controller, the page is reloads itself all the time without displaying anything.

I can't remember to have changed anything on my application. What should I do now? :-(
#2

[eluser]bradym[/eluser]
Have you turned on logging to the highest threshold to see if any messages show up in the log? Also, what are you doing for 404 errors? Are you redirecting them? Have you checked your .htaccess to make sure you don't have any redirects you don't want?

I've never seen the behavior you're describing, but these things are what I would check first.
#3

[eluser]swissbastian[/eluser]
The problem seems to be located in the .htaccess file. But no idea why.

This is my file:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

Isn't that correct?
#4

[eluser]bradym[/eluser]
That should work fine. I use the rewrite rules listed in the user guide (http://ellislab.com/codeigniter/user-gui.../urls.html) but I know lots of people have had success with the rules you posted above.

Have you double checked that mod_rewrite is enabled? The behavior you're describing sounds like that ErrorDocument redirect is kicking in.
#5

[eluser]swissbastian[/eluser]
I have multiple CI installations on the same server. But only the project updated to 1.6.2 makes trouble.

I enabled the profiler. I get the following information:

URI STRING
No URI data exists

That's strange, I get the same feedback calling domain.com/foo/bar. :-(
#6

[eluser]bradym[/eluser]
What do you have $config['uri_protocol'] in config.php set to in the working installs? Try changing your setting in config.php on the broken install to match the working ones. If they already match, try each of the different options listed in the config file.
#7

[eluser]swissbastian[/eluser]
[quote author="bradym" date="1211702090"]What do you have $config['uri_protocol'] in config.php set to in the working installs[/quote]

On the working install this variable is set to AUTO. There it works well. I now set it in the other install to REQUEST_URI and everything seem to work!

Thank you so much for your support!
#8

[eluser]bradym[/eluser]
Glad you got it working! Smile




Theme © iAndrew 2016 - Forum software by © MyBB