Apache 2.2.10 PHP 5.3.6 UBUNTU 11.10 and Codeigniter 2.1.0 |
[eluser]Unknown[/eluser]
I've dealt with codeigniter for over 3 years now. I have code working in 1.7 , 2.0 and 2.1. Recently I decided to upgrade my server to ubuntu 11.10. Upgrade was made on a clean hdd, so it is a completely new machine. I started transferring my old code (1.7 and 2.0) and noticed that i get 404 not found errors when I try to access URLs that are different than the default. So lets say, my site resided on example.com. Going to Code: http://example.com but trying to access Code: http://example.com/second_controller Code: RewriteRule .* http://codeigniter.com/ [L,R] just to see if it gets redirected. And it works. I hacked around the code for a while thinking that the issues are there ( trying to find a problem in the older codeigniter versions). Then I decided that I really can't be sure with one of my sites and I need to download a fresh codeigniter. I downloaded the latest version 2.1.0. I put it on the server, made a quick setup in the config (set the base url). Created a quick controller second_controller(a copy of the default controller).And tried it, fresh from the oven without even messing with .htaccess. I tried Code: http://example.com Code: http://example.com/index.php/second_controller http://debian_server_example.com/index.p...controller showed the second controller.?????. Just to test things more, went to a server with ubuntu 9.04 and tried it there. WORKED AGAIN. And to be on the safe side, went even further and put it on ubuntu 8.04 (which is pretty much ancient by now) . Worked fine there too. Played a bit on the forum and google. Found some people having similar issues, but nobody answered them. Some of the suggestions in the answers were to play with the Code: $config['uri_protocol'] = 'AUTO'; Code: | 'PATH_INFO' Uses the PATH_INFO
[eluser]Kyle Johnson[/eluser]
I just recently migrated my .htaccess files into the actual .conf for my site, so give this a shot and see if it helps. Code: ServerName example.com I also had some issues with the base_url and the index file giving me trouble when I did a redirect, so I implemented the changes here: Code: /* Let me know if this works. I was going to make a 11.10 build last week, and now I'm glad I didn't.
[eluser]allpointstech[/eluser]
Im having the same trouble with a base install of CI. http://localhost/ci/ http://localhost/ci/index.php Works and I get the welcome page. http://localhost/ci/index.php/welcome/ http://localhost/ci/welcome Both Fails with 404. It fails with any controller. But if I change the route of the default controller, it will load that controller when I go to http://localhost/ci/. I put this on an windows XAMPP and it works fines. It seems to be Apache or PHP. I tried adding mod_rewrite, editing the php.ini and apache configs.. I'm stuck.
[eluser]Unknown[/eluser]
[quote author="allpointstech" date="1332467026"]Im having the same trouble with a base install of CI. http://localhost/ci/ http://localhost/ci/index.php Works and I get the welcome page. http://localhost/ci/index.php/welcome/ http://localhost/ci/welcome Both Fails with 404. It fails with any controller. But if I change the route of the default controller, it will load that controller when I go to http://localhost/ci/. I put this on an windows XAMPP and it works fines. It seems to be Apache or PHP. I tried adding mod_rewrite, editing the php.ini and apache configs.. I'm stuck.[/quote] It happens the exactly same thing to me. Any clue?
[eluser]allpointstech[/eluser]
I've tried a few things. The next thing I will try to create another ubuntu server from scratch following these instructions: http://www.upubuntu.com/2011/09/how-to-i...mysql.html I did do everything in the tutorial, but not in the exact order. I also did a bunch of extra things which i don't remember. The only thing I can think of is that I must have installed something or some update which which breaks it. So I will just run it from scratch again and see if it still happens.. Or else I'm going with an earlier version of everything. |
Welcome Guest, Not a member yet? Register Sign In |