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.rst6
-rw-r--r--user_guide_src/source/installation/upgrade_300.rst37
-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_320.rst106
-rw-r--r--user_guide_src/source/installation/upgrading.rst4
6 files changed, 213 insertions, 26 deletions
diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst
index 1e28a5bf0..ae58e796f 100644
--- a/user_guide_src/source/installation/downloads.rst
+++ b/user_guide_src/source/installation/downloads.rst
@@ -3,7 +3,9 @@ Downloading CodeIgniter
#######################
- `CodeIgniter v3.2.0-dev (Current version) <https://codeload.github.com/bcit-ci/CodeIgniter/zip/develop>`_
-- `CodeIgniter v3.1.1-dev <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.1-stable>`_
+- `CodeIgniter v3.1.3-dev <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.1-stable>`_
+- `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>`_
@@ -33,4 +35,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/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst
index 0fc211f89..7b9082679 100644
--- a/user_guide_src/source/installation/upgrade_300.rst
+++ b/user_guide_src/source/installation/upgrade_300.rst
@@ -532,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.
@@ -559,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'
========================================================
@@ -624,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
@@ -633,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+.
@@ -643,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.
@@ -655,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.
@@ -845,8 +844,8 @@ CodeIgniter 3.1+.
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+.
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..76dd159e6
--- /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
+occurences 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_320.rst b/user_guide_src/source/installation/upgrade_320.rst
index 942a8a3b5..95d9aab4d 100644
--- a/user_guide_src/source/installation/upgrade_320.rst
+++ b/user_guide_src/source/installation/upgrade_320.rst
@@ -13,7 +13,18 @@ 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: Change database connection handling
+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
@@ -58,7 +69,7 @@ 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 3: Check logic related to URI parsing of CLI requests
+Step 4: Check logic related to URI parsing of CLI requests
==========================================================
When running a CodeIgniter application from the CLI, the
@@ -71,7 +82,7 @@ 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 4: Check Cache Library configurations for Redis, Memcache(d)
+Step 5: Check Cache Library configurations for Redis, Memcache(d)
=================================================================
The new improvements for the 'redis' and 'memcached' drivers of the
@@ -98,7 +109,21 @@ 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 5: Check usage of doctype() HTML helper
+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-compability 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
@@ -110,3 +135,76 @@ 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 01812169b..14127d42e 100644
--- a/user_guide_src/source/installation/upgrading.rst
+++ b/user_guide_src/source/installation/upgrading.rst
@@ -8,7 +8,9 @@ upgrading from.
.. toctree::
:titlesonly:
- Upgrading from 3.1.x to 3.2.x <upgrade_320>
+ Upgrading from 3.1.2+ to 3.2.x <upgrade_320>
+ 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>