Welcome Guest, Not a member yet? Register   Sign In
Upgrading and determining current version
#1

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?
Reply
#2

(This post was last modified: 01-25-2020, 01:25 AM by jreklund.)

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/insta...ading.html
Reply
#3

(This post was last modified: 01-25-2020, 03:11 PM by jreklund.)

(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?
Reply
#4

(This post was last modified: 01-25-2020, 03:21 PM by jreklund.)

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? :-)
Reply
#5

(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.
Reply
#6

@sidefx00

Try this...

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

const CI_VERSION = '3.1.11';
Reply




Theme © iAndrew 2016 - Forum software by © MyBB