phpBMS

root/trunk/phpbms/install/update.php

Revision 769, 14.2 KB (checked in by brieb, 2 years ago)
  • Fixes #407 - Various typos and syntax warnings
  • Property svn:keywords set to LastChangedBy LastChangedDate LastChangedRevision
Line 
1<?php
2/*
3 $Rev$ | $LastChangedBy$
4 $LastChangedDate$
5 +-------------------------------------------------------------------------+
6 | Copyright (c) 2004 - 2010, Kreotek LLC                                  |
7 | All rights reserved.                                                    |
8 +-------------------------------------------------------------------------+
9 |                                                                         |
10 | Redistribution and use in source and binary forms, with or without      |
11 | modification, are permitted provided that the following conditions are  |
12 | met:                                                                    |
13 |                                                                         |
14 | - Redistributions of source code must retain the above copyright        |
15 |   notice, this list of conditions and the following disclaimer.         |
16 |                                                                         |
17 | - Redistributions in binary form must reproduce the above copyright     |
18 |   notice, this list of conditions and the following disclaimer in the   |
19 |   documentation and/or other materials provided with the distribution.  |
20 |                                                                         |
21 | - Neither the name of Kreotek LLC nor the names of its contributore may |
22 |   be used to endorse or promote products derived from this software     |
23 |   without specific prior written permission.                            |
24 |                                                                         |
25 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS     |
26 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT       |
27 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
28 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT      |
29 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,   |
30 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT        |
31 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,   |
32 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY   |
33 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT     |
34 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   |
35 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.    |
36 |                                                                         |
37 +-------------------------------------------------------------------------+
38*/
39
40        include("update_include.php");
41
42        $updater = new updater();
43        $updater->buildList();
44
45
46        //check for php version
47        $neededVer = "5.2.0";
48        $phpVer = phpversion();
49        if(floatval($neededVer) <= floatval($phpVer))
50                $phpVerClass = "success";
51        else
52                $phpVerClass = "fail";
53
54        //check to see if mysql plugin present
55        if(phpversion("mysql"))
56                $mysqlPresent = "success";
57        else
58                $mysqlPresent = "fail";
59
60        //check the web server
61        $webServer = explode(" ",$_SERVER['SERVER_SOFTWARE']);
62        $webServer = explode("/", $webServer[0]);
63
64        if(strtolower($webServer[0]) == "apache"){
65
66                if(floatval($webServer[1]) > 2)
67                        $webServerReport["class"] = "success";
68                else
69                        $webServerReport["class"] = "warning";
70
71                $webServerReport["message"] = $webServer[0]."/".$webServer[1];
72
73        } else {
74                $webServerReport["class"] = "warning";
75                $webServerReport["message"] = "Non-Apache servers are untested and may have problems.";
76        }
77
78        $mysqlVer = $updater->getMySQLVersion();
79
80        if(floatval($mysqlVer) >= 5)
81                $mysqlPassFailClass = "success";
82        else
83                $mysqlPassFailClass = "fail";
84
85?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
86<html xmlns="http://www.w3.org/1999/xhtml">
87<head>
88<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
89<title>phpBMS Update</title>
90<link href="../common/stylesheet/mozilla/base.css" rel="stylesheet" type="text/css" />
91<link href="install.css" rel="stylesheet" type="text/css" />
92<script language="JavaScript" src="../common/javascript/common.js" type="text/javascript"></script>
93<script language="JavaScript" src="../common/javascript/moo/prototype.lite.js" type="text/javascript" ></script>
94<script language="JavaScript" src="../common/javascript/moo/moo.fx.js" type="text/javascript" ></script>
95<script language="JavaScript" src="../common/javascript/moo/moo.fx.pack.js" type="text/javascript" ></script>
96<script language="JavaScript" src="update.js" type="text/javascript" ></script>
97</head>
98
99<body>
100        <noscript>
101                <div class="bodyline">
102                        <h1>Javascript Support Disabled</h1>
103                        <p>Both the installer and the main phpBMS program require JavaScript support in order to run.</p>
104                </div>
105        </noscript>
106
107        <h1 id="topTitle">phpBMS v<?php echo $updater->list["base"]["version"]?> Update</h1>
108
109        <div class="bodyline">
110
111                <div id="navPanel">
112                        <select id="navSelect" size="10">
113                                <option value="1" selected="selected">* Preparing For Update</option>
114                                <option value="2">* Update Core Program</option>
115                                <option value="3">* Update Modules</option>
116                                <option value="4">* Generate UUIDs</option>
117                                <option value="5">* Finish Update</option>
118                        </select>
119                        <p><input type="checkbox" id="debug" /><label for="debug">updating debug</label></p>
120                </div>
121                <div id="stepsPanel">
122
123                        <div class="steps" id="step1">
124
125                                <p class="nextprevP">
126                                        <button type="button" class="disabledButtons prevButtons" disabled="disabled">back</button>
127                                        <button type="button" class="Buttons nextButtons">next</button>
128                                </p>
129
130                                <h1>Preparing For Update</h1>
131                                <p>
132                                        Before updating, there are several steps to take and insure that backup runs smoothly.
133                                </p>
134                                <ul>
135                                        <li>
136                                                <strong>Backup</strong> your data file. If you have access to a shell, using
137                                                the mysqldump command is a fast way of creating a reliable backup of your data.
138                                        </li>
139
140                                        <li>
141                                                By downloading and decompressing this update, you may have already replaced script files
142                                                from the previous version of phpBMS. If you have decompressed these files to a separate
143                                                directory and have made custom changes directly to the system we recommend backing up
144                                                those files before continuing.
145                                        </li>
146
147                                        <li>
148                                                For the latest information about phpBMS check the <a href="http://www.phpbms.org">phpBMS Project web site</a>.
149                                        </li>
150                                </ul>
151
152                                <h2>Server Requirements</h2>
153                                <table id="sysRequirements" cellpadding="0" cellspacing="0" border="0">
154                                        <thead>
155                                                <tr>
156                                                        <td>requirement</td>
157                                                        <td>server</td>
158                                                </tr>
159                                        </thead>
160                                        <tbody>
161                                                <tr>
162                                                        <td>PHP 5.2.0 or higher</td>
163                                                        <td><span class="<?php echo $phpVerClass?>"><?php echo $phpVer?></span></td>
164                                                </tr>
165                                                <tr>
166                                                        <td>PHP MySQL Support</td>
167                                                        <td><span class="<?php echo $mysqlPresent?>"><?php echo $mysqlPresent?></span></td>
168                                                </tr>
169                                                <tr>
170                                                        <td>Apache 2.0 or higher</td>
171                                                        <td><span class="<?php echo $webServerReport["class"]?>"><?php echo $webServerReport["message"]?></span></td>
172                                                </tr>
173                                                <tr>
174                                                        <td>MySQL Server 5.0 or higher</td>
175                                                        <td><span class="<?php echo $mysqlPassFailClass ?>"><?php echo $mysqlVer ?></span></td>
176                                                </tr>
177
178                                        </tbody>
179                                </table>
180
181                        </div>
182
183                        <div class="steps" id="step2">
184
185                                <p class="nextprevP">
186                                        <button type="button" class="Buttons prevButtons">back</button>
187                                        <button type="button" class="Buttons nextButtons">next</button>
188                                </p>
189
190                                <h1>Update Core Program</h1>
191
192                                <p>
193                                        The database reports the current version is <strong><?php echo $updater->list["base"]["currentversion"] ?></strong>.
194                                        The application files show the application version to upgrade to is <strong><?php echo $updater->list["base"]["version"] ?></strong>.
195                                </p>
196
197                                <?php if($updater->checkBaseUpdate()) { ?>
198
199                                        <p class="notes"><strong>Versions match.  No update is necessary.</strong></p>
200
201                                <?php } else { ?>
202
203                                        <p class="notes"><strong>You must update the phpBMS Core Program before updating any modules.</strong></p>
204
205
206                                        <p><button class="Buttons" id="updatecoreButton">Update Core Program</button> <span id="coreDataNoDebug"></span></p>
207
208                                        <div class="debugResults">
209                                                <h3>Update Core Results</h3>
210                                                <p><textarea name="results" id="coredataupdateresults" cols="40" rows="4" class="results"></textarea></p>
211                                        </div>
212
213                                <?php } //endif  ?>
214                        </div>
215
216                        <div class="steps" id="step3">
217
218                                <p class="nextprevP">
219                                        <button type="button" class="Buttons prevButtons">back</button>
220                                        <button type="button" class="Buttons nextButtons">next</button>
221                                </p>
222
223                                <h1>Update Modules</h1>
224
225                                <p>
226                                    To install a module that is not currently installed, wait until the update process
227                                    has completed successfully.  Then run the installation script and skip to the "install
228                                    modules" section.
229                                </p>
230
231                                <?php $updater->showModulesUpdate(); ?>
232
233                                <div class="debugResults">
234                                        <h3>Module Installation Results</h3>
235                                        <p><textarea name="results" id="moduleupdateresults" class="results" cols="80" rows="10"></textarea></p>
236                                </div>
237
238                        </div>
239
240                        <div class="steps" id="step4">
241
242                                <p class="nextprevP">
243                                        <button type="button" class="Buttons prevButtons">back</button>
244                                        <button type="button" class="Buttons nextButtons">next</button>
245                                </p>
246
247                                <h1>Generate UUIDs</h1>
248
249                                <p>
250                                    Version 0.98 represents a fundamental shift in data record recognition.  By utilizing
251                                    Universal Unique IDs (UUID), phpBMS now becomes easier to share data with other applications,
252                                    program and update custom modules, and insure referential integrity.  To do this, the program
253                                    needs to transfer from the reliance on MySQL's auto increment ID system, and generate it's
254                                    own UUID's for all records and relationship records in your database.
255                                </p>
256
257                                <p class="notes"><strong>Warning:</strong> Make sure you have updated all modules to the latest version before performing this upgrade.</p>
258
259                                <p><button class="Buttons" id="updateUUIDsButton">Generate UUIDs</button> <span id="updateUUIDsNoDebug"></span></p>
260
261
262                                <div class="debugResults">
263                                        <h3>UUID Generation Results</h3>
264                                        <p><textarea name="results" id="updateUUIDsResult" class="results" cols="80" rows="10"></textarea></p>
265                                </div>
266
267                        </div>
268
269                        <div class="steps" id="step5">
270
271                                <p class="nextprevP">
272                                        <button type="button" class="Buttons prevButtons">back</button>
273                                        <button type="button" class="disabledButtons nextButtons" disabled="disabled">next</button>
274                                </p>
275
276                                <h1>Finish Update</h1>
277                                <p>
278                                        To finish the update process you will need to:
279                                </p>
280                                <ul>
281                                        <li>
282                                                <h3>Delete Install Folders</h3>
283                                                <p>
284                                                        You must delete both the core installation folder, as well as all modules' installation
285                                                        folders before you can use the system
286                                                </p>
287                                        </li>
288                                        <li>
289                                                <h3>Clear your Browser Cache</h3>
290                                                <p>
291                                                        Part of the update process may have replaced javascript and stylesheet (css) files.
292                                                        Most browsers cache these files to speed loading times. In order to insure that
293                                                        your web application is using all of the latest updates, you will need to
294                                                        clear the browser cache of all client browsers that access the application.
295                                                </p>
296                                                <p>
297                                                        Most browsers will clear this cache automatically if you simply restart the browser
298                                                </p>
299                                        </li>
300                                        <li>
301                                                <h3>Payment Information Encryption</h3>
302                                                <p>
303                                                    If you store sensitive payment information such as credit card
304                                                    numbers make sure to enable the encryption option in the configuration page
305                                                    underneath the BMS module section. You will also need to create and link
306                                                    to an external file on the server that contains the encryption key. Typically,
307                                                    encryption key files are text files containing a 64-128 character hash.
308                                                </p>
309                                        </li>
310
311                                </ul>
312                                <h2>Troubleshooting</h2>
313                                <h3>General Help </h3>
314                                <p>
315                                If you have problems during updating, have questions about how the program works, or would like additional
316                                information about phpBMS, please visit the <a href="http://www.phpbms.org">phpBMS Project web site</a>.  The phpBMS project web site
317                                has many resources to help you including a user wiki, users forum, and mailing list that can help you.</p>
318                                <h3>Paid Customization, Update, Support Options</h3>
319                                <p>Paid technical support and phpBMS customization is available from <a href="http://www.kreotek.com">Kreotek</a>.</p>
320
321                                <h2>Help Make phpBMS Better!</h2>
322
323                                <h3>Registration</h3>
324
325                                <p>
326                                    Take the time to register your copy of phpBMS.  Registration helps
327                                    guide future development of the project so we can continue to make
328                                    focus on the communities needs.
329                                </p>
330                                <p id="registerP">Take a minute to <a href="kreotek.com/registerphpbms">register your copy of phpBMS</a> today.</p>
331
332                                <h3>Contribute</h3>
333
334                                <p>
335                                    phpBMS is true open source software.  Contributions in the form of code patches, new modules,
336                                    documentation, and bug reporting are always appreciated.  You can find out more about
337                                    contributing to the project at <a href="http://www.phpbms.org">community web site</a>.
338                                </p>
339                        </div>
340
341                </div>
342
343        </div>
344
345        <p class="tiny" align="center"> $Rev$ |  $LastChangedDate$</p>
346</body>
347</html>
Note: See TracBrowser for help on using the browser.
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.