CodeIgniter Forums
CI 3.1.1 Index/index gives 404 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19)
+--- Thread: CI 3.1.1 Index/index gives 404 (/showthread.php?tid=66468)



CI 3.1.1 Index/index gives 404 - RBX - 10-24-2016

I believe there is a bug in 3.1.1, or at least when migrating from 3.1.0 to 3.1.1 - the index method of Index controller stops working and gives 404.
I used this migration guide. http://www.codeigniter.com/user_guide/installation/upgrade_311.html


RE: CI 3.1.1 Index/index gives 404 - Narf - 10-24-2016

Index::index() has always been a "reserved" name because it's a PHP4-style constructor. It has never worked without causing problems, nothing to do with CI 3.1.1, nor with CI at all for that matter.


RE: CI 3.1.1 Index/index gives 404 - RBX - 10-24-2016

(10-24-2016, 10:11 AM)Narf Wrote: Index::index() has always been a "reserved" name because it's a PHP4-style constructor. It has never worked without causing problems, nothing to do with CI 3.1.1, nor with CI at all for that matter.

It works perfectly well in CI 3.1.0. I'll rename it for 3.1.1.


RE: CI 3.1.1 Index/index gives 404 - Narf - 10-24-2016

(10-24-2016, 10:17 AM)RBX Wrote:
(10-24-2016, 10:11 AM)Narf Wrote: Index::index() has always been a "reserved" name because it's a PHP4-style constructor. It has never worked without causing problems, nothing to do with CI 3.1.1, nor with CI at all for that matter.

It works perfectly well in CI 3.1.0. I'll rename it for 3.1.1.

It maybe didn't trigger a 404, but it deffinately didn't work "perfectly well".


RE: CI 3.1.1 Index/index gives 404 - RBX - 10-24-2016

(10-24-2016, 10:27 AM)Narf Wrote:
(10-24-2016, 10:17 AM)RBX Wrote:
(10-24-2016, 10:11 AM)Narf Wrote: Index::index() has always been a "reserved" name because it's a PHP4-style constructor. It has never worked without causing problems, nothing to do with CI 3.1.1, nor with CI at all for that matter.

It works perfectly well in CI 3.1.0. I'll rename it for 3.1.1.

It maybe didn't trigger a 404, but it deffinately didn't work "perfectly well".

I believe Index::index() isn't treated as a constructor if an explicit __construct is present, so why does this cause an issue?


RE: CI 3.1.1 Index/index gives 404 - Narf - 10-24-2016

(10-24-2016, 11:45 AM)RBX Wrote:
(10-24-2016, 10:27 AM)Narf Wrote:
(10-24-2016, 10:17 AM)RBX Wrote:
(10-24-2016, 10:11 AM)Narf Wrote: Index::index() has always been a "reserved" name because it's a PHP4-style constructor. It has never worked without causing problems, nothing to do with CI 3.1.1, nor with CI at all for that matter.

It works perfectly well in CI 3.1.0. I'll rename it for 3.1.1.

It maybe didn't trigger a 404, but it deffinately didn't work "perfectly well".

I believe Index::index() isn't treated as a constructor if an explicit __construct is present, so why does this cause an issue?

You're right to believe that, but we can't arbitrarily require a (often otherwise useless) __construct() for Index::index().


RE: CI 3.1.1 Index/index gives 404 - sv3tli0 - 10-25-2016

PHP 4 constructors are deprecated in PHP 7.0, but at least until they are removed such Index::index names won't be just a normal combination.
So its not usable, the same way as it wasn't in the past..
Once this PHP 4 constructors are fully removed in some future 7.x or even at PHP 8, this combination will be ok I think to exists and work.