summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/installation
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/installation')
-rw-r--r--user_guide_src/source/installation/downloads.rst15
-rw-r--r--user_guide_src/source/installation/index.rst18
-rw-r--r--user_guide_src/source/installation/troubleshooting.rst4
-rw-r--r--user_guide_src/source/installation/upgrade_150.rst4
-rw-r--r--user_guide_src/source/installation/upgrade_210.rst8
-rw-r--r--user_guide_src/source/installation/upgrade_300.rst117
-rw-r--r--user_guide_src/source/installation/upgrade_301.rst2
-rw-r--r--user_guide_src/source/installation/upgrade_302.rst24
-rw-r--r--user_guide_src/source/installation/upgrade_303.rst55
-rw-r--r--user_guide_src/source/installation/upgrade_304.rst14
-rw-r--r--user_guide_src/source/installation/upgrade_305.rst14
-rw-r--r--user_guide_src/source/installation/upgrade_306.rst48
-rw-r--r--user_guide_src/source/installation/upgrade_310.rst38
-rw-r--r--user_guide_src/source/installation/upgrade_311.rst14
-rw-r--r--user_guide_src/source/installation/upgrade_312.rst40
-rw-r--r--user_guide_src/source/installation/upgrade_313.rst46
-rw-r--r--user_guide_src/source/installation/upgrade_314.rst14
-rw-r--r--user_guide_src/source/installation/upgrade_320.rst210
-rw-r--r--user_guide_src/source/installation/upgrading.rst11
19 files changed, 647 insertions, 49 deletions
diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst
index 16c8e537a..d36296e35 100644
--- a/user_guide_src/source/installation/downloads.rst
+++ b/user_guide_src/source/installation/downloads.rst
@@ -2,7 +2,18 @@
Downloading CodeIgniter
#######################
-- `CodeIgniter v3.0.1-dev (Current version) <https://codeload.github.com/bcit-ci/CodeIgniter/zip/develop>`_
+- `CodeIgniter v3.2.0-dev (Current version) <https://codeload.github.com/bcit-ci/CodeIgniter/zip/develop>`_
+- `CodeIgniter v3.1.4-dev <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.1-stable>`_
+- `CodeIgniter v3.1.3 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.1.3>`_
+- `CodeIgniter v3.1.2 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.1.2>`_
+- `CodeIgniter v3.1.1 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.1.1>`_
+- `CodeIgniter v3.1.0 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.1.0>`_
+- `CodeIgniter v3.0.6 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.6>`_
+- `CodeIgniter v3.0.5 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.5>`_
+- `CodeIgniter v3.0.4 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.4>`_
+- `CodeIgniter v3.0.3 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.3>`_
+- `CodeIgniter v3.0.2 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.2>`_
+- `CodeIgniter v3.0.1 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.1>`_
- `CodeIgniter v3.0.0 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.0>`_
- `CodeIgniter v2.2.3 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/2.2.3>`_
- `CodeIgniter v2.2.2 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/2.2.2>`_
@@ -25,4 +36,4 @@ Please note that while every effort is made to keep this code base
functional, we cannot guarantee the functionality of code taken from
the develop branch.
-Beginning with version 2.0.3, stable versions are also available via `GitHub Releases <https://github.com/bcit-ci/CodeIgniter/releases>`_. \ No newline at end of file
+Beginning with version 2.0.3, stable versions are also available via `GitHub Releases <https://github.com/bcit-ci/CodeIgniter/releases>`_.
diff --git a/user_guide_src/source/installation/index.rst b/user_guide_src/source/installation/index.rst
index 50493bbbd..fbf6ecee1 100644
--- a/user_guide_src/source/installation/index.rst
+++ b/user_guide_src/source/installation/index.rst
@@ -6,37 +6,37 @@ CodeIgniter is installed in four steps:
#. Unzip the package.
#. Upload the CodeIgniter folders and files to your server. Normally the
- index.php file will be at your root.
-#. Open the application/config/config.php file with a text editor and
+ *index.php* file will be at your root.
+#. Open the *application/config/config.php* file with a text editor and
set your base URL. If you intend to use encryption or sessions, set
your encryption key.
#. If you intend to use a database, open the
- application/config/database.php file with a text editor and set your
+ *application/config/database.php* file with a text editor and set your
database settings.
If you wish to increase security by hiding the location of your
CodeIgniter files you can rename the system and application folders to
something more private. If you do rename them, you must open your main
-index.php file and set the $system_path and $application_folder
+*index.php* file and set the ``$system_path`` and ``$application_folder``
variables at the top of the file with the new name you've chosen.
For the best security, both the system and any application folders
should be placed above web root so that they are not directly accessible
-via a browser. By default, .htaccess files are included in each folder
+via a browser. By default, *.htaccess* files are included in each folder
to help prevent direct access, but it is best to remove them from public
access entirely in case the web server configuration changes or doesn't
-abide by the .htaccess.
+abide by the *.htaccess*.
If you would like to keep your views public it is also possible to move
the views folder out of your application folder.
After moving them, open your main index.php file and set the
-$system_path, $application_folder and $view_folder variables,
-preferably with a full path, e.g. '/www/MyUser/system'.
+``$system_path``, ``$application_folder`` and ``$view_folder`` variables,
+preferably with a full path, e.g. '*/www/MyUser/system*'.
One additional measure to take in production environments is to disable
PHP error reporting and any other development-only functionality. In
-CodeIgniter, this can be done by setting the ENVIRONMENT constant, which
+CodeIgniter, this can be done by setting the ``ENVIRONMENT`` constant, which
is more fully described on the :doc:`security
page <../general/security>`.
diff --git a/user_guide_src/source/installation/troubleshooting.rst b/user_guide_src/source/installation/troubleshooting.rst
index e874bb0ec..cca290763 100644
--- a/user_guide_src/source/installation/troubleshooting.rst
+++ b/user_guide_src/source/installation/troubleshooting.rst
@@ -5,11 +5,11 @@ Troubleshooting
If you find that no matter what you put in your URL only your default
page is loading, it might be that your server does not support the
REQUEST_URI variable needed to serve search-engine friendly URLs. As a
-first step, open your application/config/config.php file and look for
+first step, open your *application/config/config.php* file and look for
the URI Protocol information. It will recommend that you try a couple
alternate settings. If it still doesn't work after you've tried this
you'll need to force CodeIgniter to add a question mark to your URLs. To
-do this open your **application/config/config.php** file and change this::
+do this open your *application/config/config.php* file and change this::
$config['index_page'] = "index.php";
diff --git a/user_guide_src/source/installation/upgrade_150.rst b/user_guide_src/source/installation/upgrade_150.rst
index bfe01ebba..50eb5eae5 100644
--- a/user_guide_src/source/installation/upgrade_150.rst
+++ b/user_guide_src/source/installation/upgrade_150.rst
@@ -49,8 +49,8 @@ Open your application/config/config.php file and ADD these new items::
| This item allows you to set the filename/classname prefix when extending
| native libraries. For more information please see the user guide:
|
- | http://codeigniter.com/user_guide/general/core_classes.html
- | http://codeigniter.com/user_guide/general/creating_libraries.html
+ | https://codeigniter.com/user_guide/general/core_classes.html
+ | https://codeigniter.com/user_guide/general/creating_libraries.html
|
*/
$config['subclass_prefix'] = 'MY_';
diff --git a/user_guide_src/source/installation/upgrade_210.rst b/user_guide_src/source/installation/upgrade_210.rst
index 5874bfc86..421435452 100644
--- a/user_guide_src/source/installation/upgrade_210.rst
+++ b/user_guide_src/source/installation/upgrade_210.rst
@@ -13,14 +13,14 @@ Replace all files and directories in your "system" folder.
.. note:: If you have any custom developed files in these folders please
make copies of them first.
-Step 2: Replace config/user_agents.php
-======================================
+Step 2: Replace config/mimes.php
+================================
This config file has been updated to contain more user agent types,
-please copy it to _application/config/user_agents.php*.
+please copy it to *application/config/mimes.php*.
Step 3: Update your user guide
==============================
Please also replace your local copy of the user guide with the new
-version. \ No newline at end of file
+version.
diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst
index 971f9e484..4e2ff8ab2 100644
--- a/user_guide_src/source/installation/upgrade_300.rst
+++ b/user_guide_src/source/installation/upgrade_300.rst
@@ -65,7 +65,7 @@ Step 3: Replace config/mimes.php
********************************
This config file has been updated to contain more user mime-types, please copy
-it to _application/config/mimes.php*.
+it to *application/config/mimes.php*.
**************************************************************
Step 4: Remove $autoload['core'] from your config/autoload.php
@@ -111,7 +111,7 @@ that you should make:
- Set your ``$config['sess_driver']`` value
- It will default to 'files', unles you've previously used
+ It will default to 'files', unless you've previously used
``$config['sess_use_database']``, in which case it will be set to
'database'.
@@ -206,13 +206,13 @@ Step 8: Replace your error templates
************************************
In CodeIgniter 3.0, the error templates are now considered as views and have been moved to the
-_application/views/errors* directory.
+*application/views/errors* directory.
Furthermore, we've added support for CLI error templates in plain-text format that unlike HTML,
is suitable for the command line. This of course requires another level of separation.
-It is safe to move your old templates from _application/errors* to _application/views/errors/html*,
-but you'll have to copy the new _application/views/errors/cli* directory from the CodeIgniter archive.
+It is safe to move your old templates from *application/errors* to *application/views/errors/html*,
+but you'll have to copy the new *application/views/errors/cli* directory from the CodeIgniter archive.
******************************************
Step 9: Update your config/routes.php file
@@ -266,8 +266,7 @@ cause your 'Main' controller to be loaded.
However, what happens if you have an *application/controllers/admin/*
directory and the user visits ``http://example.com/admin/``?
In CodeIgniter 3, the router will look for a 'Main' controller under the
-admin/ directory as well. If not found, it will fallback to the parent
-(*application/controllers/*) directory, like in version 2.x.
+admin/ directory as well. If not found, a Not Found (404) will be triggered.
The same rule applies to the '404_override' setting.
@@ -465,8 +464,51 @@ files and error messages format:
Therefore you're encouraged to update its usage sooner rather than
later.
+************************************************************
+Step 19: Make sure your 'base_url' config value is not empty
+************************************************************
+
+When ``$config['base_url']`` is not set, CodeIgniter tries to automatically
+detect what your website's base URL is. This is done purely for convenience
+when you are starting development of a new application.
+
+Auto-detection is never reliable and also has security implications, which
+is why you should **always** have it manually configured!
+
+One of the changes in CodeIgniter 3.0.3 is how this auto-detection works,
+and more specifically it now falls back to the server's IP address instead
+of the hostname requested by the client. Therefore, if you've ever relied
+on auto-detection, it will change how your website works now.
+
+In case you need to allow e.g. multiple domains, or both http:// and
+https:// prefixes to be dynamically used depending on the request,
+remember that *application/config/config.php* is still a PHP script, in
+which you can create this logic with a few lines of code. For example::
+
+ $allowed_domains = array('domain1.tld', 'domain2.tld');
+ $default_domain = 'domain1.tld';
+
+ if (in_array($_SERVER['HTTP_HOST'], $allowed_domains, TRUE))
+ {
+ $domain = $_SERVER['HTTP_HOST'];
+ }
+ else
+ {
+ $domain = $default_domain;
+ }
+
+ if ( ! empty($_SERVER['HTTPS']))
+ {
+ $config['base_url'] = 'https://'.$domain;
+ }
+ else
+ {
+ $config['base_url'] = 'http://'.$domain;
+ }
+
+
****************************************************************
-Step 19: Remove usage of (previously) deprecated functionalities
+Step 20: Remove usage of (previously) deprecated functionalities
****************************************************************
In addition to the ``$autoload['core']`` configuration setting, there's a
@@ -490,9 +532,9 @@ the ``EXT`` constant has been removed. Use just '.php' instead.
Smiley helper
=============
-The :doc:`Smiley Helper <../helpers/smiley_helper>` is a legacy feature from EllisLab's
-ExpressionEngine product. However, it is too specific for a general purpose framework like
-CodeIgniter and as such it is now deprecated.
+The *Smiley Helper* is a legacy feature from EllisLab's ExpressionEngine product.
+However, it is too specific for a general purpose framework like CodeIgniter
+and as such it is now deprecated.
Also, the previously deprecated ``js_insert_smiley()`` (since version 1.7.2) is now removed.
@@ -517,12 +559,12 @@ implemented cryptographic functions.
The Cart library
================
-The :doc:`Cart Library <../libraries/cart>`, similarly to the :doc:`Smiley Helper
-<../helpers/smiley_helper>` is too specific for CodeIgniter. It is now deprecated
-and scheduled for removal in CodeIgniter 3.1+.
+The *Cart Library*, similarly to the *Smiley Helper* is too specific for
+CodeIgniter. It is now deprecated and scheduled for removal in
+CodeIgniter 3.1+.
-.. note:: The library is still available, but you're strongly encouraged to remove its usage sooner
- rather than later.
+.. note:: The library is still available, but you're strongly encouraged to
+ remove its usage sooner rather than later.
Database drivers 'mysql', 'sqlite', 'mssql', 'pdo/dblib'
========================================================
@@ -582,7 +624,7 @@ CodeIgniter 3.1+.
String helper repeater()
========================
-:doc:`String Helper <../helpers/string_helper>` function :php:func:`repeater()` is now just an alias for
+:doc:`String Helper <../helpers/string_helper>` function ``repeater()`` is now just an alias for
PHP's native ``str_repeat()`` function. It is deprecated and scheduled for removal in CodeIgniter 3.1+.
.. note:: This function is still available, but you're strongly encouraged to remove its usage sooner
@@ -591,7 +633,7 @@ PHP's native ``str_repeat()`` function. It is deprecated and scheduled for remov
String helper trim_slashes()
============================
-:doc:`String Helper <../helpers/string_helper>` function :php:func:`trim_slashes()` is now just an alias
+:doc:`String Helper <../helpers/string_helper>` function ``trim_slashes()`` is now just an alias
for PHP's native ``trim()`` function (with a slash passed as its second argument). It is deprecated and
scheduled for removal in CodeIgniter 3.1+.
@@ -601,8 +643,8 @@ scheduled for removal in CodeIgniter 3.1+.
Form helper form_prep()
=======================
-:doc:`Form Helper <../helpers/form_helper>` function :php:func:`form_prep()`
-is now just an alias for :doc:`common function </general/common_functions>`
+:doc:`Form Helper <../helpers/form_helper>` function ``form_prep()`` is now
+just an alias for :doc:`common function </general/common_functions>`
:func:`html_escape()`. It is deprecated and will be removed in the future.
Please use :php:func:`html_escape()` instead.
@@ -613,14 +655,13 @@ Please use :php:func:`html_escape()` instead.
Email helper functions
======================
-:doc:`Email Helper <../helpers/email_helper>` only has two functions
+The *Email Helper* only has two functions:
- - :php:func:`valid_email()`
- - :php:func:`send_email()`
+ - ``valid_email()``
+ - ``send_email()``
Both of them are now aliases for PHP's native ``filter_var()`` and ``mail()`` functions, respectively.
-Therefore the :doc:`Email Helper <../helpers/email_helper>` altogether is being deprecated and
-is scheduled for removal in CodeIgniter 3.1+.
+Therefore, the *Email Helper* altogether is being deprecated and is scheduled for removal in CodeIgniter 3.1+.
.. note:: These functions are still available, but you're strongly encouraged to remove their usage
sooner rather than later.
@@ -800,20 +841,38 @@ CodeIgniter 3.1+.
.. note:: This method is still available, but you're strongly encouraged to remove its usage
sooner rather than later.
-======================
The Javascript library
======================
-The :doc:`Javascript Library <../libraries/javascript>` has always had an
-'experimental' status and was never really useful, nor a proper solution.
+The *Javascript Library* has always had an 'experimental' status and was
+never really useful, nor a proper solution.
It is now deprecated and scheduled for removal in CodeIgniter 3.1+.
.. note:: This library is still available, but you're strongly encouraged to remove its usage
sooner rather than later.
+Form Validation method prep_for_form()
+======================================
+
+The :doc:`Form Validation Library <../libraries/form_validation>` has a
+``prep_for_form()`` method, which is/can also be used as a rule in
+``set_rules()`` to automatically perform HTML encoding on input data.
+
+Automatically encoding input (instead of output) data is a bad practice in
+the first place, and CodeIgniter and PHP itself offer other alternatives
+to this method anyway.
+For example, :doc:`Form Helper <../helpers/form_helper>` functions will
+automatically perform HTML escaping when necessary.
+
+Therefore, the *prep_for_form* method/rule is pretty much useless and is now
+deprecated and scheduled for removal in 3.1+.
+
+.. note:: The method is still available, but you're strongly encouraged to
+ remove its usage sooner rather than later.
+
***********************************************************
-Step 20: Check your usage of Text helper highlight_phrase()
+Step 21: Check your usage of Text helper highlight_phrase()
***********************************************************
The default HTML tag used by :doc:`Text Helper <../helpers/text_helper>` function
diff --git a/user_guide_src/source/installation/upgrade_301.rst b/user_guide_src/source/installation/upgrade_301.rst
index f38d34008..450cdb288 100644
--- a/user_guide_src/source/installation/upgrade_301.rst
+++ b/user_guide_src/source/installation/upgrade_301.rst
@@ -16,4 +16,4 @@ Replace all files and directories in your *system/* directory.
Step 2: Update your CLI error templates
=======================================
-Replace all files under your *application/errors/cli/* directory. \ No newline at end of file
+Replace all files under your *application/views/errors/cli/* directory.
diff --git a/user_guide_src/source/installation/upgrade_302.rst b/user_guide_src/source/installation/upgrade_302.rst
new file mode 100644
index 000000000..93d87ac41
--- /dev/null
+++ b/user_guide_src/source/installation/upgrade_302.rst
@@ -0,0 +1,24 @@
+#############################
+Upgrading from 3.0.1 to 3.0.2
+#############################
+
+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/* directory.
+
+.. note:: If you have any custom developed files in these directories,
+ please make copies of them first.
+
+Step 2: Update your application/config/constants.php file
+=========================================================
+
+The *application/config/constants.php* file has been updated to check
+if constants aren't already defined before doing that, making it easier
+to add an environment-specific configuration.
+
+.. note:: If you've made modifications to this file, please make a
+ backup first and cross-check the differences first. \ No newline at end of file
diff --git a/user_guide_src/source/installation/upgrade_303.rst b/user_guide_src/source/installation/upgrade_303.rst
new file mode 100644
index 000000000..d13a0fe46
--- /dev/null
+++ b/user_guide_src/source/installation/upgrade_303.rst
@@ -0,0 +1,55 @@
+#############################
+Upgrading from 3.0.2 to 3.0.3
+#############################
+
+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/* directory.
+
+.. note:: If you have any custom developed files in these directories,
+ please make copies of them first.
+
+Step 2: Make sure your 'base_url' config value is not empty
+===========================================================
+
+When ``$config['base_url']`` is not set, CodeIgniter tries to automatically
+detect what your website's base URL is. This is done purely for convenience
+when you are starting development of a new application.
+
+Auto-detection is never reliable and also has security implications, which
+is why you should **always** have it manually configured!
+
+One of the changes in CodeIgniter 3.0.3 is how this auto-detection works,
+and more specifically it now falls back to the server's IP address instead
+of the hostname requested by the client. Therefore, if you've ever relied
+on auto-detection, it will change how your website works now.
+
+In case you need to allow e.g. multiple domains, or both http:// and
+https:// prefixes to be dynamically used depending on the request,
+remember that *application/config/config.php* is still a PHP script, in
+which you can create this logic with a few lines of code. For example::
+
+ $allowed_domains = array('domain1.tld', 'domain2.tld');
+ $default_domain = 'domain1.tld';
+
+ if (in_array($_SERVER['HTTP_HOST'], $allowed_domains, TRUE))
+ {
+ $domain = $_SERVER['HTTP_HOST'];
+ }
+ else
+ {
+ $domain = $default_domain;
+ }
+
+ if ( ! empty($_SERVER['HTTPS']))
+ {
+ $config['base_url'] = 'https://'.$domain;
+ }
+ else
+ {
+ $config['base_url'] = 'http://'.$domain;
+ }
diff --git a/user_guide_src/source/installation/upgrade_304.rst b/user_guide_src/source/installation/upgrade_304.rst
new file mode 100644
index 000000000..4d5bd2bb0
--- /dev/null
+++ b/user_guide_src/source/installation/upgrade_304.rst
@@ -0,0 +1,14 @@
+#############################
+Upgrading from 3.0.3 to 3.0.4
+#############################
+
+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/* directory.
+
+.. note:: If you have any custom developed files in these directories,
+ please make copies of them first.
diff --git a/user_guide_src/source/installation/upgrade_305.rst b/user_guide_src/source/installation/upgrade_305.rst
new file mode 100644
index 000000000..a47982481
--- /dev/null
+++ b/user_guide_src/source/installation/upgrade_305.rst
@@ -0,0 +1,14 @@
+#############################
+Upgrading from 3.0.4 to 3.0.5
+#############################
+
+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/* directory.
+
+.. note:: If you have any custom developed files in these directories,
+ please make copies of them first.
diff --git a/user_guide_src/source/installation/upgrade_306.rst b/user_guide_src/source/installation/upgrade_306.rst
new file mode 100644
index 000000000..3863e0afa
--- /dev/null
+++ b/user_guide_src/source/installation/upgrade_306.rst
@@ -0,0 +1,48 @@
+#############################
+Upgrading from 3.0.5 to 3.0.6
+#############################
+
+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/* directory.
+
+.. note:: If you have any custom developed files in these directories,
+ please make copies of them first.
+
+Step 2: Update your index.php file (optional)
+=============================================
+
+We've made some tweaks to the index.php file, mostly related to proper
+usage of directory separators (i.e. use the ``DIRECTORY_SEPARATOR``
+constant instead of a hard coded forward slash "/").
+
+Nothing will break if you skip this step, but if you're running Windows
+or just want to be up to date with every change - we do recommend that
+you update your index.php file.
+
+*Tip: Just copy the ``ENVIRONMENT``, ``$system_path``, ``$application_folder``
+and ``$view_folder`` declarations from the old file and put them into the
+new one, replacing the defaults.*
+
+Step 3: Remove 'prep_for_form' usage (deprecation)
+==================================================
+
+The :doc:`Form Validation Library <../libraries/form_validation>` has a
+``prep_for_form()`` method, which is/can also be used as a rule in
+``set_rules()`` to automatically perform HTML encoding on input data.
+
+Automatically encoding input (instead of output) data is a bad practice in
+the first place, and CodeIgniter and PHP itself offer other alternatives
+to this method anyway.
+For example, :doc:`Form Helper <../helpers/form_helper>` functions will
+automatically perform HTML escaping when necessary.
+
+Therefore, the *prep_for_form* method/rule is pretty much useless and is now
+deprecated and scheduled for removal in 3.1+.
+
+.. note:: The method is still available, but you're strongly encouraged to
+ remove its usage sooner rather than later.
diff --git a/user_guide_src/source/installation/upgrade_310.rst b/user_guide_src/source/installation/upgrade_310.rst
new file mode 100644
index 000000000..cae814327
--- /dev/null
+++ b/user_guide_src/source/installation/upgrade_310.rst
@@ -0,0 +1,38 @@
+#############################
+Upgrading from 3.0.6 to 3.1.0
+#############################
+
+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/* directory.
+
+.. note:: If you have any custom developed files in these directories,
+ please make copies of them first.
+
+Step 2: Check your PHP version
+==============================
+
+We recommend always running versions that are `currently supported
+<https://secure.php.net/supported-versions.php>`_, which right now is at least PHP 5.6.
+
+PHP 5.2.x versions are now officially not supported by CodeIgniter, and while 5.3.7+
+may be at least runnable, we strongly discourage you from using any PHP versions below
+the ones listed on the `PHP.net Supported Versions <https://secure.php.net/supported-versions.php>`_
+page.
+
+Step 3: If you're using the 'odbc' database driver, check for usage of Query Builder
+====================================================================================
+
+:doc:`Query Builder <../database/query_builder>` functionality and ``escape()`` can
+no longer be used with the 'odbc' database driver.
+
+This is because, due to its nature, the `ODBC extension for PHP <https://secure.php.net/odbc>`_
+does not provide a function that allows to safely escape user-supplied strings for usage
+inside an SQL query (which our :doc:`Query Builder <../database/query_builder>` relies on).
+
+Thus, user inputs MUST be bound, as shown in :doc:`Running Queries <../database/queries>`,
+under the "Query Bindings" section.
diff --git a/user_guide_src/source/installation/upgrade_311.rst b/user_guide_src/source/installation/upgrade_311.rst
new file mode 100644
index 000000000..a36e72323
--- /dev/null
+++ b/user_guide_src/source/installation/upgrade_311.rst
@@ -0,0 +1,14 @@
+#############################
+Upgrading from 3.1.0 to 3.1.1
+#############################
+
+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/* directory.
+
+.. note:: If you have any custom developed files in these directories,
+ please make copies of them first.
diff --git a/user_guide_src/source/installation/upgrade_312.rst b/user_guide_src/source/installation/upgrade_312.rst
new file mode 100644
index 000000000..e0b2191dd
--- /dev/null
+++ b/user_guide_src/source/installation/upgrade_312.rst
@@ -0,0 +1,40 @@
+#############################
+Upgrading from 3.1.1 to 3.1.2
+#############################
+
+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/* directory.
+
+.. note:: If you have any custom developed files in these directories,
+ please make copies of them first.
+
+Step 2: Update your "ci_sessions" database table
+================================================
+
+If you're using the :doc:`Session Library </libraries/sessions>` with the
+'database' driver, you may have to ``ALTER`` your sessions table for your
+sessions to continue to work.
+
+.. note:: The table in question is not necessarily named "ci_sessions".
+ It is what you've set as your ``$config['sess_save_path']``.
+
+This will only affect you if you've changed your ``session.hash_function``
+*php.ini* setting to something like 'sha512'. Or if you've been running
+an older CodeIgniter version on PHP 7.1+.
+
+It is recommended that you do this anyway, just to avoid potential issues
+in the future if you do change your configuration.
+
+Just execute the one of the following SQL queries, depending on your
+database::
+
+ // MySQL:
+ ALTER TABLE ci_sessions CHANGE id id varchar(128) NOT NULL;
+
+ // PostgreSQL
+ ALTER TABLE ci_sessions ALTER COLUMN id SET DATA TYPE varchar(128);
diff --git a/user_guide_src/source/installation/upgrade_313.rst b/user_guide_src/source/installation/upgrade_313.rst
new file mode 100644
index 000000000..13af775a1
--- /dev/null
+++ b/user_guide_src/source/installation/upgrade_313.rst
@@ -0,0 +1,46 @@
+#############################
+Upgrading from 3.1.2 to 3.1.3
+#############################
+
+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/* directory.
+
+.. note:: If you have any custom developed files in these directories,
+ please make copies of them first.
+
+Step 2: Remove usage of nice_date() helper (deprecation)
+========================================================
+
+The :doc:`Date Helper <../helpers/date_helper>` function ``nice_date()`` is
+no longer useful since the introduction of PHP's `DateTime classes
+<https://secure.php.net/datetime>`_
+
+You can replace it with the following:
+::
+
+ DateTime::createFromFormat($input_format, $input_date)->format($desired_output_format);
+
+Thus, ``nice_date()`` is now deprecated and scheduled for removal in
+CodeIgniter 3.2+.
+
+.. note:: The function is still available, but you're strongly encouraged
+ to remove its usage sooner rather than later.
+
+Step 3: Remove usage of $config['standardize_newlines']
+=======================================================
+
+The :doc:`Input Library <../libraries/input>` would optionally replace
+occurrences of `\r\n`, `\r`, `\n` in input data with whatever the ``PHP_EOL``
+value is on your system - if you've set ``$config['standardize_newlines']``
+to ``TRUE`` in your *application/config/config.php*.
+
+This functionality is now deprecated and scheduled for removal in
+CodeIgniter 3.2.+.
+
+.. note:: The functionality is still available, but you're strongly
+ encouraged to remove its usage sooner rather than later.
diff --git a/user_guide_src/source/installation/upgrade_314.rst b/user_guide_src/source/installation/upgrade_314.rst
new file mode 100644
index 000000000..3f2da6564
--- /dev/null
+++ b/user_guide_src/source/installation/upgrade_314.rst
@@ -0,0 +1,14 @@
+#############################
+Upgrading from 3.1.3 to 3.1.4
+#############################
+
+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/* directory.
+
+.. note:: If you have any custom developed files in these directories,
+ please make copies of them first.
diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst
new file mode 100644
index 000000000..18f8717f8
--- /dev/null
+++ b/user_guide_src/source/installation/upgrade_320.rst
@@ -0,0 +1,210 @@
+#############################
+Upgrading from 3.1.x to 3.2.x
+#############################
+
+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/* directory.
+
+.. note:: If you have any custom developed files in these directories,
+ please make copies of them first.
+
+Step 2: Check your PHP version
+==============================
+
+We recommend always running versions that are `currently supported
+<https://secure.php.net/supported-versions.php>`_, which right now is at least PHP 5.6.
+
+PHP 5.3.x versions are now officially not supported by CodeIgniter, and while 5.4.8+
+may be at least runnable, we strongly discourage you from using any PHP versions below
+the ones listed on the `PHP.net Supported Versions <https://secure.php.net/supported-versions.php>`_
+page.
+
+Step 3: Change database connection handling
+===========================================
+
+"Loading" a database, whether by using the *config/autoload.php* settings
+or manually via calling ``$this->load->database()`` or the less-known
+``DB()`` function, will now throw a ``RuntimeException`` in case of a
+failure.
+
+In addition, being unable to set the configured character set is now also
+considered a connection failure.
+
+.. note:: This has been the case for most database drivers in the in the
+ past as well (i.e. all but the 'mysql', 'mysqli' and 'postgre'
+ drivers).
+
+What this means is that if you're unable to connect to a database, or
+have an erroneous character set configured, CodeIgniter will no longer
+fail silently, but will throw an exception instead.
+
+You may choose to explicitly catch it (and for that purpose you can't use
+*config/autoload.php* to load the :doc:`Database Class <../database/index>`)
+::
+
+ try
+ {
+ $this->load->database();
+ }
+ catch (RuntimeException $e)
+ {
+ // Handle the failure
+ }
+
+Or you may leave it to CodeIgniter's default exception handler, which would
+log the error message and display an error screen if you're running in
+development mode.
+
+Remove db_set_charset() calls
+-----------------------------
+
+With the above-mentioned changes, the purpose of the ``db_set_charset()``
+method would now only be to change the connection character set at runtime.
+That doesn't make sense and that's the reason why most database drivers
+don't support it at all.
+Thus, ``db_set_charset()`` is no longer necessary and is removed.
+
+Step 4: Check logic related to URI parsing of CLI requests
+==========================================================
+
+When running a CodeIgniter application from the CLI, the
+:doc:`URI Library <../libraries/uri>` will now ignore the
+``$config['url_suffix']`` and ``$config['permitted_uri_chars']``
+configuration settings.
+
+These two options don't make sense under the command line (which is why
+this change was made) and therefore you shouldn't be affected by this, but
+if you've relied on them for some reason, you'd probably have to make some
+changes to your code.
+
+Step 5: Check Cache Library configurations for Redis, Memcache(d)
+=================================================================
+
+The new improvements for the 'redis' and 'memcached' drivers of the
+:doc:`Cache Library <../libraries/caching>` may require some small
+adjustments to your configuration values ...
+
+Redis
+-----
+
+If you're using the 'redis' driver with a UNIX socket connection, you'll
+have to move the socket path from ``$config['socket']`` to
+``$config['host']`` instead.
+
+The ``$config['socket_type']`` option is also removed, although that won't
+affect your application - it will be ignored and the connection type will
+be determined by the format used for ``$config['host']`` instead.
+
+Memcache(d)
+-----------
+
+The 'memcached' will now ignore configurations that don't specify a ``host``
+value (previously, it just set the host to the default '127.0.0.1').
+
+Therefore, if you've added a configuration that only sets e.g. a ``port``,
+you will now have to explicitly set the ``host`` to '127.0.0.1' as well.
+
+Step 6: Check usage of the Email library
+========================================
+
+The :doc:`Email Library <../libraries/email>` will now by default check the
+validity of all e-mail addresses passed to it. This check used to be Off by
+default, and required explicitly setting the **validate** option to ``TRUE``
+in order to enable it.
+
+Naturally, a validity check should not result in any problems, but this is
+technically a backwards-compatibility break and you should check that
+everything works fine.
+If something indeed goes wrong with that, please report it as a bug to us,
+and you can disable the **validate** option to revert to the old behavior.
+
+Step 7: Check usage of doctype() HTML helper
+============================================
+
+The :doc:`HTML Helper <../helpers/html_helper>` function
+:php:func:`doctype()` used to default to 'xhtml1-strict' (XHTML 1.0 Strict)
+when no document type was specified. That default value is now changed to
+'html5', which obviously stands for the modern HTML 5 standard.
+
+Nothing should be really broken by this change, but if your application
+relies on the default value, you should double-check it and either
+explicitly set the desired format, or adapt your front-end to use proper
+HTML 5 formatting.
+
+Step 8: Check usage of form_upload() Form helper
+================================================
+
+The :doc:`Form Helper <../helpers/form_helper>` function
+:php:func:`form_upload()` used to have 3 parameters, the second of which
+(``$value``) was never used, as it doesn't make sense for an HTML ``input``
+tag of the "file" type.
+
+That dead parameter is now removed, and so if you've used the third one
+(``$extra``), having code like this::
+
+ form_upload('name', 'irrelevant value', $extra);
+
+You should change it to::
+
+ form_upload('name', $extra);
+
+Step 9: Remove usage of previously deprecated functionalities
+=============================================================
+
+The following is a list of functionalities deprecated in previous
+CodeIgniter versions that have been removed in 3.2.0:
+
+- ``$config['allow_get_array']`` (use ``$_GET = array();`` instead)
+- ``$config['standardize_newlines']``
+- ``$config['rewrite_short_tags']`` (no impact; irrelevant on PHP 5.4+)
+
+- 'sqlite' database driver (no longer shipped with PHP 5.4+; 'sqlite3' is still available)
+
+- ``CI_Input::is_cli_request()`` (use :php:func:`is_cli()` instead)
+- ``CI_Router::fetch_directory()`` (use ``CI_Router::$directory`` instead)
+- ``CI_Router::fetch_class()`` (use ``CI_Router::$class`` instead)
+- ``CI_Router::fetch_method()`` (use ``CI_Router::$method`` instead)
+- ``CI_Config::system_url()`` (encourages insecure practices)
+- ``CI_Form_validation::prep_for_form()`` (the *prep_for_form* rule)
+
+- ``standard_date()`` :doc:`Date Helper <../helpers/date_helper>` function (use ``date()`` instead)
+- ``do_hash()`` :doc:`Security Helper <../helpers/security_helper>` function (use ``hash()`` instead)
+- ``br()`` :doc:`HTML Helper <../helpers/html_helper>` function (use ``str_repeat()`` with ``'<br />'`` instead)
+- ``nbs()`` :doc:`HTML Helper <../helpers/html_helper>` function (use ``str_repeat()`` with ``'&nbsp;'`` instead)
+- ``trim_slashes()`` :doc:`String Helper <../helpers/string_helper>` function (use ``trim()`` with ``'/'`` instead)
+- ``repeater()`` :doc:`String Helper <../helpers/string_helper>` function (use ``str_repeat()`` instead)
+- ``read_file()`` :doc:`File Helper <../helpers/file_helper>` function (use ``file_get_contents()`` instead)
+- ``form_prep()`` :doc:`Form Helper <../helpers/form_helper>` function (use :php:func:`html_escape()` instead)
+
+- The entire *Cart Library* (an archived version is available on GitHub: `bcit-ci/ci3-cart-library <https://github.com/bcit-ci/ci3-cart-library>`_)
+- The entire *Javascript Library* (it was always experimental in the first place)
+
+- The entire *Email Helper*, which only had two functions:
+
+ - ``valid_email()`` (use ``filter_var($email, FILTER_VALIDATE_EMAIL)`` instead)
+ - ``send_email()`` (use ``mail()`` instead)
+
+- The entire *Smiley Helper* (an archived version is available on GitHub: `bcit-ci/ci3-smiley-helper <https://github.com/bcit-ci/ci3-smiley-helper>`_)
+
+Step 10: Make sure you're validating all user inputs
+====================================================
+
+The :doc:`Input Library <../libraries/input>` used to (often
+unconditionally) filter and/or sanitize user input in the ``$_GET``,
+``$_POST`` and ``$_COOKIE`` superglobals.
+
+This was a legacy feature from older times, when things like
+`register_globals <https://secure.php.net/register_globals>`_ and
+`magic_quotes_gpc <https://secure.php.net/magic_quotes_gpc>`_ existed in
+PHP.
+It was a necessity back then, but this is no longer the case and reliance
+on global filters is a bad practice, giving you a false sense of security.
+
+This functionality is now removed, and so if you've relied on it for
+whatever reasons, you should double-check that you are properly validating
+all user inputs in your application (as you always should do).
diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst
index e0f0dd5b7..ca7677ba9 100644
--- a/user_guide_src/source/installation/upgrading.rst
+++ b/user_guide_src/source/installation/upgrading.rst
@@ -8,6 +8,17 @@ upgrading from.
.. toctree::
:titlesonly:
+ Upgrading from 3.1.3+ to 3.2.x <upgrade_320>
+ Upgrading from 3.1.3 to 3.1.4 <upgrade_314>
+ Upgrading from 3.1.2 to 3.1.3 <upgrade_313>
+ Upgrading from 3.1.1 to 3.1.2 <upgrade_312>
+ Upgrading from 3.1.0 to 3.1.1 <upgrade_311>
+ Upgrading from 3.0.6 to 3.1.0 <upgrade_310>
+ Upgrading from 3.0.5 to 3.0.6 <upgrade_306>
+ Upgrading from 3.0.4 to 3.0.5 <upgrade_305>
+ Upgrading from 3.0.3 to 3.0.4 <upgrade_304>
+ Upgrading from 3.0.2 to 3.0.3 <upgrade_303>
+ Upgrading from 3.0.1 to 3.0.2 <upgrade_302>
Upgrading from 3.0.0 to 3.0.1 <upgrade_301>
Upgrading from 2.2.x to 3.0.x <upgrade_300>
Upgrading from 2.2.2 to 2.2.3 <upgrade_223>