Advertisement
johncarlson21

Upgrade etoFork

Nov 6th, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.49 KB | None | 0 0
  1. <?php
  2. // upgradeStart.php
  3. // Etomite CMS upgrade instructions
  4. // Modified: 2006-04-08 by Ralph Dahlgren
  5. // Modified: 2007-05-03 by Ralph Dahlgren
  6. // Modified: 2008-04-25 [v1.0] by Ralph Dahlgren
  7. // Modified 2008-05-08 [v1.1] by Ralph Dahlgren
  8. // Modified 2013-11-06 [v2.0] by John Carlson
  9.  
  10. session_start();
  11. $_SESSION['session_test'] = 1;
  12. include("../manager/includes/version.inc.php");
  13. $errors = 0;
  14. ?>
  15.  
  16. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  17.   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  18. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  19. <head>
  20.   <title>etoFork - Installation</title>
  21.   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  22.     <style type="text/css">
  23.       @import url('../assets/site/style.css');
  24.       .ok
  25.       {
  26.         color:green;
  27.         font-weight: bold;
  28.       }
  29.       .notok
  30.       {
  31.         color:red;
  32.         font-weight: bold;
  33.       }
  34.       .labelHolder
  35.       {
  36.         width : 180px;
  37.         float : left;
  38.         font-weight: bold;
  39.       }
  40.     </style>
  41.   <script type="text/javascript" src="extLinks.js"> </script>
  42. </head>
  43.  
  44. <body>
  45. <table border="0" cellpadding="0" cellspacing="0" class="mainTable">
  46.   <tr class="fancyRow">
  47.     <td><span class="headers">&nbsp;<img src="../manager/images/misc/dot.gif" alt="" style="margin-top: 1px;" />&nbsp;etoFork <?php echo $code_name." v".$release; ?></span></td>
  48.     <td align="right"><span class="headers">Etomite 1.x Upgrade</span></td>
  49.   </tr>
  50.   <tr class="fancyRow2">
  51.     <td colspan="2" class="border-top-bottom smallText" align="right">&nbsp;</td>
  52.   </tr>
  53.   <tr align="left" valign="top">
  54.     <td colspan="2"><table width="100%"  border="0" cellspacing="0" cellpadding="1">
  55.       <tr align="left" valign="top">
  56.         <td class="pad" id="content" colspan="2">
  57.  
  58.           <h1>Releases Not Supported</h1>
  59.  
  60.           <p>Pre Etomite 1.0 is not supported!</p>
  61.  
  62.           <h1>Performing System Checks</h1>
  63.  
  64. <?php
  65. echo "Checking if <span class='mono'>manager/includes/config.inc.php</span> file exists: ";
  66. if(!file_exists("../manager/includes/config.inc.php")) {
  67.   echo "<span class='notok'>Failed!</span>";
  68.   $errors += 1;
  69.   $noConfig = true;
  70. } else {
  71.   echo "<span class='ok'>OK!</span>";
  72. }
  73.  
  74. if($noConfig != true) {
  75.   echo "<br />Checking if <span class='mono'>manager/includes/config.inc.php</span> is writable: ";
  76.   if(!is_writable("../manager/includes/config.inc.php")) {
  77.     echo "<span class='notok'>Failed!</span>";
  78.     $errors += 1;
  79.     $notWritable = true;
  80.   } else {
  81.     echo "<span class='ok'>OK!</span>";
  82.   }
  83.  
  84.   echo "<br />Checking if <span class='mono'>manager/includes/config.inc.php</span> is valid: ";
  85.   @include("../manager/includes/config.inc.php");
  86.   // If config.inc.php doesn't exist or isn't complete, display installer link and die
  87.   if(empty($database_server)
  88.   || strpos($database_server, "{") !== false
  89.   || strpos($database_server, "}") !== false
  90.   || strpos($database_user, "{") !== false
  91.   || strpos($database_user, "}") !== false
  92.   || strpos($database_password, "{") !== false
  93.   || strpos($database_password, "}") !== false
  94.   || strpos($dbase, "{") !== false
  95.   || strpos($dbase, "}") !== false
  96.   || strpos($table_prefix, "{") !== false
  97.   || strpos($table_prefix, "}") !== false)
  98.   {
  99.     echo "<span class='notok'>Failed!</span>";
  100.     $errors += 1;
  101.     $notValid = true;
  102.   } else {
  103.     echo "<span class='ok'>OK!</span>";
  104.   }
  105. }
  106.  
  107. if($errors > 0) {
  108. ?>
  109.  
  110. <p>Unfortunately, the etoFork install / upgrade cannot continue at the moment, due to the above <?php echo $errors > 1 ? $errors." " : "" ; ?>error<?php echo $errors > 1 ? "s" : "" ; ?>. Please correct the error<?php echo $errors > 1 ? "s" : "" ; ?>, and <a href="./upgradeStart.php" title="Try Again">try again</a>. If the explanation below doesn't help, please visit the  <a class="external" href="http://www.etomite.com/forums" title="Get Help Now" target="_blank">Etomite Forums</a>.</p>
  111.  
  112. <?php
  113. if($noConfig) {
  114. ?>
  115.  
  116. <p>The configuration file was not found. There are two main reasons why the file may be missing - either you have deleted or moved this file, or you have accidentally chosed to upgrade instead of performing a new installation.</p>
  117.  
  118. <?php } ?>
  119.  
  120. <?php
  121. if($notWritable) {
  122. ?>
  123.  
  124. <p>The <span class='mono'>manager/includes/config.inc.php</span> file must be writable so that this script can make any required changes to that file.</p>
  125.  
  126. <?php } ?>
  127.  
  128. <?php
  129. if($notValid) {
  130. ?>
  131.  
  132. <p>Because you have chosen to upgrade a pervious Etomite installation a valid configuration file should already be in place. While a configuration file was found, it does not currently contain all of the required valid settings.</p>
  133.  
  134. <?php } ?>
  135.  
  136. <?php
  137. if($noConfig || $notValid) {
  138. ?>
  139.  
  140. <p>If you have accidentally deleted this file, and don't have a backup, you can edit <span class='mono'>manager/includes/config.inc.generic.php</span> by replacing each of the placeholder <b>{TAG}</b>'s with the appropriate database settings for your installation and save it as <span class='mono'>manager/includes/config.inc.php</span> and then <a href="./upgradeStart.php" title="Try Again">try again</a>. If custom sessions were being used then those settings will also need to be reset.</p>
  141.  
  142. <?php } ?>
  143.  
  144. <p>If you are attempting to perform a <b>New installation</b>, please <a href="./index.php" title="Go Back">go back</a> and make the proper selection.</p>
  145.  
  146. <?php
  147. // everything checks out ok so we can proceed with the upgrade
  148. } else {
  149.   // check the current configuration file to see if it needs to be upgraded
  150.   echo "<br />Checking if <span class='mono'>manager/includes/config.inc.php</span> file upgraded: ";
  151.   include("../manager/includes/config.inc.php");
  152.   if($config_release != $release) {
  153.     echo "<span class='notok'>Failed!</span> -- <a href='upgradeConfig.php' title='Fix it now'><b><u>Upgrade Now</u></b></a>";
  154.     $oldConfig = true;
  155.   } else {
  156.     echo "<span class='ok'>OK!</span>";
  157.   }
  158. ?>
  159.       <p></p>
  160.       <h1>Upgrade Instructions for Etomite 0.6.1 and newer</h1>
  161.  
  162.       <p>The fact that you are reading these instructions indicates that you have already copied the new files for this release onto your server.</p>
  163.  
  164.       <p>If you have not already done so, please take the time to read the <a class="external" href="README.html" title="Click to read this file now.">README</a> file. There is also a text version located in the root directory where this package was installed. Doing so could eliminate the possibility of encountering un-needed problems during your Etomite upgrade.</p>
  165.  
  166.       <p>All existing installations being upgraded which had a release number prior to Etomite Prelude v1.0 will require various database updates. Once you have successfully completed the configuration file modifications listed below it is <b>mandatory</b> that you run the script, <b> <a href="v1_db_patches.php" title="Click to run this script now"><b><u>v1_db_patches.php</u></b></a></b>, before attempting to access your sites main page or entering your Etomite Manager. You can execute this script now by clicking on the script name above and, upon successful completion, you can return to this script - or you may opt to run the script independently. Attempting to run this script on a previously updated database will not result in any problems - you will simply receive messages stating an OK completion status for each item.</p>
  167.  
  168.       <p>Once the above steps have been completed login to your  <a class="external" href="../manager/" title="Etomite Manager Login"><b><u>Etomite manager</u></b></a>, verify and save your Etomite Configuration, and perform a Clear site cache from the Etomite Main Menu. After these steps have been completed you should have a fully function Etomite Prelude v<?php echo $release; ?> installation.</p>
  169.  
  170.       <p>Once you have completed the required tasks in the Etomite manager you can <a href="../" title="Go There Now"><b><u>Click Here</u></b></a> to see your upgraded site in action.</p>
  171.  
  172.       <p><b>Good luck!</b></p>
  173.  
  174.       <p><b>The Etomite CMS Project Development Team</b></p>
  175.  
  176.       <p style="text-align:center;"> <a class="external" href="http://www.etomite.com" title="www.etomite.com">Etomite Website</a>&nbsp;|&nbsp; <a class="external" href="http://www.etomite.com/forums/" title="Support Forums">Etomite Support Forums</a></p>
  177.  
  178. <?php } ?>
  179.  
  180.     </td>
  181.       </tr>
  182.     </table></td>
  183.   </tr>
  184.   <tr class="fancyRow2">
  185.     <td class="border-top-bottom smallText">&nbsp;</td>
  186.     <td class="border-top-bottom smallText" align="right">&nbsp;</td>
  187.   </tr>
  188. </table>
  189. </body>
  190. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement