• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating new web site based on old CI version

The company I work for handed me a copy of a site that was built on CI version 2.1.3. They want me to use all that functionality and create a new site for a different arm of the company. As a quick check, I built a local server using all the up-to-date versions of everything, copied that site including CI and it failed miserably as expected though I think much of that was due to using the latest version of PHP.

So I installed CI version 3 and copied all the directories from the old site just to see what would happen. While CI3 comes up just fine on its own, putting the old site in there has issues with pages calling other pages which want mySQL access, jQuery animation and on and on. I just don't know how deep this rabbit hole is going to go.

So my question is, is it crazy to think I can take a site built on version 2.1.3 and rebuild a different company site using current versions of PHP, mySQL, etc? I'm thinking I need to tell them we need to build from new but if someone has a magic formula, I'd love to hear it.

The simplest thing to do would be to port it to 2.2.2, which should require few, if any, changes to the code to get things working. However, 2.2.2 is only receiving security updates for a few more months. Still, it's a good first step to make sure things are working before making the big upgrade to 3.0.

The upgrade guide for upgrading from 2.2.x to 3.0 is pretty thorough. There are only a handful of things that would really require a lot of work to get ported over to 3.0. The current versions of PHP are supported by both CI 2.2.2 and 3.0. MySQL access is not a problem, though you should configure the site to use the mysqli driver instead of the deprecated mysql driver. jQuery animation is a non-issue, because CodeIgniter doesn't interfere with it in any way.

Try to migrate first before considering to build for scratch.
NexoPOS 2.6.2 available on CodeCanyon.

I should have stated, too, that the original site was created for an Apache server and I'm trying to recreate it on nginx. I've successfully run CI3 with no issues but just get a blank page with CI 2.1.3.

Apache vs. nginx is just going to be a matter of getting the server configured correctly. Unfortunately, I can't be of much help with that, but I'm sure there are some examples out there of how to configure nginx and CI to work together properly.

Honestly, I would probably start with comparing the CI config files you're using to the default config files for that version of CI to see what was changed for your application/server environment. You may also want to check the index.php file to make sure your ENVIRONMENT is set to 'development' while you're working on the upgrade (assuming this is a development server), because you could be suppressing error messages that might help you fix the problem(s).

Web site builders may be for free but they do not have the custom coding that's need
in a lot of the sites out there.

Your old site will need to have all the constructors change to the new one.

The Active Record will need to be updated to the Query Builder code.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.