Skip to content

Commit

Permalink
Add 2.2.6 upgrade instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
narfbg committed Oct 31, 2015
1 parent b2fef14 commit e07de17
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 1 deletion.
2 changes: 1 addition & 1 deletion user_guide/installation/upgrade_225.html
Expand Up @@ -55,7 +55,7 @@
<!-- START CONTENT -->
<div id="content">

<h1>Upgrading from 2.2.5 to 2.2.5</h1>
<h1>Upgrading from 2.2.4 to 2.2.5</h1>

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

Expand Down
127 changes: 127 additions & 0 deletions user_guide/installation/upgrade_226.html
@@ -0,0 +1,127 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Upgrading from 2.2.4 to 2.2.5 : CodeIgniter User Guide</title>

<style type='text/css' media='all'>@import url('../userguide.css');</style>
<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />

<script type="text/javascript" src="../nav/nav.js"></script>
<script type="text/javascript" src="../nav/prototype.lite.js"></script>
<script type="text/javascript" src="../nav/moo.fx.js"></script>
<script type="text/javascript" src="../nav/user_guide_menu.js"></script>

<meta http-equiv='expires' content='-1' />
<meta http-equiv= 'pragma' content='no-cache' />
<meta name='robots' content='all' />
<meta name='author' content='ExpressionEngine Dev Team' />
<meta name='description' content='CodeIgniter User Guide' />

</head>
<body>

<!-- START NAVIGATION -->
<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
<td><h1>CodeIgniter User Guide Version 2.2.6</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
</div>
<!-- END NAVIGATION -->


<!-- START BREADCRUMB -->
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
<td id="breadcrumb">
<a href="http://codeigniter.com/">CodeIgniter Home</a> &nbsp;&#8250;&nbsp;
<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
Upgrading from 2.2.5 to 2.2.6
</td>
<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
</tr>
</table>
<!-- END BREADCRUMB -->

<br clear="all" />


<!-- START CONTENT -->
<div id="content">

<h1>Upgrading from 2.2.5 to 2.2.6</h1>

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

<h2>Step 1: Update your CodeIgniter files</h2>

<p>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.</p>

<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p>

<h1>Step 2: Make sure your 'base_url' configuration value is not empty</h1>

<p>When <samp>$config['base_url']</samp> 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.</p>

<p>Auto-detection is never reliable and also has security implications, which
is why you should <b>always</b> have it manually configured!</p>

<p>One of the changes in CodeIgniter 2.2.6 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.</p>

<p>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::</p>

<pre>
$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;
}
</pre>
</p>

</div>
<!-- END CONTENT -->


<div id="footer">
<p>
Previous Topic:&nbsp;&nbsp;<a href="index.html">Installation Instructions</a>
&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
Next Topic:&nbsp;&nbsp;<a href="troubleshooting.html">Troubleshooting</a>
</p>
<p><a href="http://codeigniter.com">CodeIgniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 - 2014 &nbsp;&middot;&nbsp; <a href="http://ellislab.com/">EllisLab, Inc.</a> &nbsp;&middot;&nbsp; Copyright &#169; 2014 - 2015 &nbsp;&middot;&nbsp; <a href="http://bcit.ca/">British Columbia Institute of Technology</a></p>
</div>

</body>
</html>
1 change: 1 addition & 0 deletions user_guide/installation/upgrading.html
Expand Up @@ -60,6 +60,7 @@ <h1>Upgrading From a Previous Version</h1>
<p>Please read the upgrade notes corresponding to the version you are upgrading from.</p>

<ul>
<li><a href="upgrade_226.html">Upgrading from 2.2.5 to 2.2.6</a></li>
<li><a href="upgrade_225.html">Upgrading from 2.2.4 to 2.2.5</a></li>
<li><a href="upgrade_224.html">Upgrading from 2.2.3 to 2.2.4</a></li>
<li><a href="upgrade_223.html">Upgrading from 2.2.2 to 2.2.3</a></li>
Expand Down

0 comments on commit e07de17

Please sign in to comment.