CodeIgniter compatible with PHP version?

I am using CodeIgniter 2.2.6 with PHP 5.5 and it works great. Now I want to upgrade PHP to version 5.6.6, my question is, is CodeIgniter compatible with PHP 5.6.6?

I cannot update CodeIgniter to the new version because I have many models based on version 2.2.6.

-1
source share
3 answers

The Server Requirements user guide states that CodeIngiter 2 requires "PHP version 5.1.6 or later."

Please note that PHP 5.6 will cease to receive active support in less than a month , so you may need to upgrade to version 7. PHP 5.6 should receive security patches by the end of 2018.

I cannot update CodeIgniter to the new version because I have many models based on version 2.2.6.

Please note that CodeIgniter 2 is no longer supported:

the current version (2.2.6) was released in October 2015.

CodeIgniter 2 has reached the end of its support and update service life as of October 31, 2015. No further updates are planned.

We recommend that you upgrade to CodeIgniter 3.x!

There is an upgrade path from version 2.2 to version 3.1, which I recommend you study:

This is probably not as difficult as you think, and with the security implications, I think it is worth it.

+2
source

CI supports php 5.x versions. If you want to upgrade your CI project, please visit https://www.codeigniter.com/userguide3/installation/upgrade_300.html

0
source

Codeigniter 2.2x COMPATIBLE with PHP7.1 +.

You only need to remember:

  • Models / classes, etc. case sensitive and must start with a capital letter
  • Same with file names in application folder
  • There are problems with mysql (a very old driver that is not used now), so you need to use the mysqli driver (but it is already implemented in CI2, check if you are already using it).
  • If you have a session table, sometimes you will have to crop this table, clear the cache and fill it again.
  • Check for software compatibility in the third_party folder if you have problems. CI is not responsible for these problems.

In my case, everything works smoothly with the newest version of bootstrap and jQuery installed. However, I do not use interceptors, advanced features, etc.

NOTE that in most cases you can force the server to use an older version of php using the .htaccess and AddHandler commands:

AddHandler application/x-httpd-php56 .php 

This is the latest version of PHP before PHP7.

And last but not least - of course, I do not recommend using this very old version of CI, however, in my opinion, in my cases it makes no sense to migrate from CI2x to CI3, in 2018 it is better to wait for CI4, and then migrate.

0
source

Source: https://habr.com/ru/post/1238013/


All Articles