CI 3.1.2 Unable to load any controller but default |
Hi all,
I've been using CI 2.0 for a long time, but now that I have a new project I'd like to move to CI 3.0. I've downloaded and installed CI 3.1.2 and the welcome controller loads properly if I write: http://example.com Sadly, if I try to load it this way it fails: http://example.com/index.php/welcome So does all controllers I've tried to create. For instance I've created the following controller in the application/controllers/Test.php file: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); It doesn't load using: http://example.com/index.php/test But if I change default controller from "welcome" to "test" then it returns OK properly if I browse to: http://example.com/ Also, if I run it from the CLI it works properly and again returns OK, no matter if is set as default of not: Code: php index.php test I have tried to change $config['uri_protocol'] to QUERY_STRING and PATH_INFO without succes, I've tried to change base_url so its value is 'http://example.com/' instead of empty. Server is a Raspberry Pi 2 using raspbian: Code: Linux raspberrypi 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux This is php version: Code: PHP 5.4.45-0+deb7u5 (cli) (built: Sep 18 2016 17:23:08) I hope someone can help :-)
I have just done the same using a fresh install of CI 3.1.2. It happens the same, http://example.com/ loads the welcome controller but http://example.com/index.php/welcome returns "not found"
CodeIgniter Users Guide: PHP version 5.6 or newer is recommended.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(11-07-2016, 03:53 AM)utodev Wrote: Hi all, What do you use as webserver and how is it connected to php? eg. apache and php-fpm make a script eg. test.php Code: <?php call it like "test.php/welcome" and post the result (11-07-2016, 03:16 PM)Narf Wrote:(11-07-2016, 03:14 PM)InsiteFX Wrote: CodeIgniter Users Guide: PHP version 5.6 or newer is recommended. Because the Users Guide states that: It should work on 5.3.7 as well, but we strongly advise you NOT to run such old versions of PHP, because of potential security and performance issues, as well as missing features. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(11-07-2016, 09:46 PM)Paradinight Wrote: I've tried this and I also get a not found error, but if I just run test.php it returns data in the REQUEST_URI value (QUERY_STRING is an empty string and PATH_INFO is NULL). It seems php is connected cause it runs (and otherwise the welcome controller won't work either) but there must be something in the Apache configuration, I'll check. Thanks I hope this leads me through the good track :-) |
Welcome Guest, Not a member yet? Register Sign In |