summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/installation/upgrade_300.rst
blob: 14199092f7b74b6e3dcd14cbf0adc241fdde775f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#############################
Upgrading from 2.1.0 to 3.0.0
#############################

.. note:: These upgrade notes are for a version that is yet to be released.


Before performing an update you should take your site offline by
replacing the index.php file with a static one.

Step 1: Update your CodeIgniter files
=====================================

Replace all files and directories in your "system" folder and replace
your index.php file. If any modifications were made to your index.php
they will need to be made fresh in this new one.

.. note:: If you have any custom developed files in these folders please
	make copies of them first.

Step 2: Change References to the SHA Library
============================================

The previously deprecated SHA library has been removed in CodeIgniter 3.0.
Alter your code to use the native `sha1()` PHP function to generate a sha1 hash.

Additionally, the `sha1()` method in the :doc:`Encryption Library <../libraries/encryption>` has been removed.

Step 3: Remove $autoload['core'] from your config/autoload.php
==============================================================

Use of the `$autoload['core']` config array has been deprecated as of CodeIgniter 1.4.1 and is now removed.
Move any entries that you might have listed there to `$autoload['libraries']` instead.

Step 4: Update your config/database.php
=======================================

Due to 3.0.0's renaming of Active Record to Query Builder, inside your `config/database.php`, you will
need to rename the `$active_record` variable to `$query_builder`.

    $active_group = 'default';
    // $active_record = TRUE;
    $query_builder = TRUE;

Step 5: Move your errors folder
===============================

In version 3.0.0, the errors folder has been moved from _application/errors* to _application/views/errors*.