CodeIgniter Forums
Upgrading and determining current version - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Upgrading and determining current version (/showthread.php?tid=75309)



Upgrading and determining current version - sidefx00 - 01-24-2020

I inherited a project a while ago and we're trying to upgrade to PHP 7.

I googled how to find what version I'm using but I don't seem to have a CI_VERSION in the codebase, or a a system directory, there is a core directory but no CodeIgniter.php file.

I'm guessing I'm using a very early version, so what kind of process would be involved in upgrade this to something modern that is compatible with PHP 7?


RE: Upgrading and determining current version - jreklund - 01-25-2020

You can anywhere in your code use the following, you don't need to find the file itself.
PHP Code:
<?php echo CI_VERSION?>

As for where the system folder are (or it have been renamed) you can look for it in your index.php file "$system_path".

After you how found your version, use these upgrade guides. You should read them all, but you can grab the latest version and replace all those files with those instead of going thru them all.
https://codeigniter.com/user_guide/installation/upgrading.html


RE: Upgrading and determining current version - sidefx00 - 01-25-2020

(01-25-2020, 01:23 AM)jreklund Wrote: As for where the system folder are (or it have been renamed) you can look for it in your index.php file "$system_path".

I don't see anything like that in the index.php file.  Is there any other place it could be?  I have a core folder in the public_html, is it possible a very old version didn't use that path?


RE: Upgrading and determining current version - jreklund - 01-25-2020

It's used in CI 1.7, CI 2 and CI 3. I don't have access to any older version I'm afraid.
Can you post the contents of your index.php here? In case it dosen't contain any sensitive content.

Are you sure you are using Codeigniter? :-)


RE: Upgrading and determining current version - sidefx00 - 01-26-2020

(01-25-2020, 03:16 PM)jreklund Wrote: It's used in CI 1.7, CI 2 and CI 3. I don't have access to any older version I'm afraid.
Can you post the contents of your index.php here? In case it dosen't contain any sensitive content.

Are you sure you are using Codeigniter? :-)

I am sure I'm at least using some of Coeigniter because all their function work.  It may have been heavenly modified before I got it.  

I can't find much to post that doesn't have any sensitive information in it unfortunately.

I may install a fresh older version on another server and try to work my way through there.  

Thanks for the help.


RE: Upgrading and determining current version - php_rocs - 01-27-2020

@sidefx00

Try this...

Look for const in system/core/CodeIgniter.php:

const CI_VERSION = '3.1.11';