phpBMS

root/trunk/phpbms/install/index.php

Revision 745, 18.6 KB (checked in by brieb, 2 years ago)
  • implemented patch from #398 (small typos and bugs)
  • reinstated debug mode now that release is (almost) done
Line 
1<?php
2/*
3 $Rev: 392 $ | $LastChangedBy: brieb $
4 $LastChangedDate: 2008-05-13 17:06:00 -0600 (Tue, 13 May 2008) $
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        require("install_include.php");
41        require("../phpbmsversion.php");
42
43        $moduleClass = new modules();
44        $moduleClass->list = array_merge($modules, $moduleClass->list);
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
79?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
80<html xmlns="http://www.w3.org/1999/xhtml">
81<head>
82<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
83<title>phpBMS Installation</title>
84<link href="../common/stylesheet/mozilla/base.css" rel="stylesheet" type="text/css" />
85<link href="install.css" rel="stylesheet" type="text/css" />
86<script language="JavaScript" src="../common/javascript/moo/prototype.lite.js" type="text/javascript" ></script>
87<script language="JavaScript" src="../common/javascript/moo/moo.fx.js" type="text/javascript" ></script>
88<script language="JavaScript" src="../common/javascript/moo/moo.fx.pack.js" type="text/javascript" ></script>
89<script language="JavaScript" src="../common/javascript/common.js" type="text/javascript"></script>
90<script language="JavaScript" src="install.js" type="text/javascript"></script>
91<script language="JavaScript" type="text/javascript">
92        <?php $moduleClass->displpayJS() ?>
93</script>
94</head>
95
96<body>
97        <noscript>
98                <div class="bodyline">
99                        <h1>Javascript Support Disabled</h1>
100                        <p>Both the installer and the main phpBMS program require JavaScript support in order to run.</p>
101                </div>
102        </noscript>
103
104        <h1 id="topTitle">phpBMS v<?php echo $moduleClass->list["base"]["version"]?> Installation</h1>
105
106        <div class="bodyline">
107
108                <div id="navPanel">
109                        <select id="navSelect" size="10">
110                                <option value="1" selected="selected">* System Requirements</option>
111                                <option value="2">* Create settings.php File</option>
112                                <option value="3">* Test Database Connection</option>
113                                <option value="4">* Create the Database</option>
114                                <option value="5">* Populate Core Data</option>
115                                <option value="6">* Install Modules</option>
116                                <option value="7">* Secure the Application</option>
117                                <option value="8">* Complete Installation</option>
118                        </select>
119                        <p><input type="checkbox" id="debug" /><label for="debug">installation 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>System Requirements</h1>
131                                <p>
132                                        Welcome to the phpBMS installation process. If
133                                        you have any problems with the installation process,
134                                        try activating the installation debug checkbox on the left.
135                                        Before continuing, make sure your system meets the
136                                        requirements.
137                                </p>
138
139                                <h2>Server Requirements</h2>
140                                <table id="sysRequirements" cellpadding="0" cellspacing="0" border="0">
141                                        <thead>
142                                                <tr>
143                                                        <td>requirement</td>
144                                                        <td>server</td>
145                                                </tr>
146                                        </thead>
147                                        <tbody>
148                                                <tr>
149                                                        <td>PHP 5.2.0 or higher</td>
150                                                        <td><span class="<?php echo $phpVerClass?>"><?php echo $phpVer?></span></td>
151                                                </tr>
152                                                <tr>
153                                                        <td>PHP MySQL Support</td>
154                                                        <td><span class="<?php echo $mysqlPresent?>"><?php echo $mysqlPresent?></span></td>
155                                                </tr>
156                                                <tr>
157                                                        <td>Apache 2.0 or higher</td>
158                                                        <td><span class="<?php echo $webServerReport["class"]?>"><?php echo $webServerReport["message"]?></span></td>
159                                                </tr>
160                                                <tr>
161                                                        <td>MySQL Server 5.0 or higher</td>
162                                                        <td>tested when connection established</td>
163                                                </tr>
164
165                                        </tbody>
166                                </table>
167
168                                <h2>Recommend Settings</h2>
169
170                                <ul>
171                                        <li>CRON support for running php scripts.</li>
172                                        <li>GD PHP Support (for some graphics on reports)</li>
173                                </ul>
174
175                        </div>
176
177
178                        <div class="steps" id="step2">
179                                <p class="nextprevP">
180                                        <button type="button" class="Buttons prevButtons">back</button>
181                                        <button type="button" class="Buttons nextButtons">next</button>
182                                </p>
183
184                                <h1>Create settings.php File</h1>
185
186                                <p>
187                                        You need to create the settings.php file that will contain your
188                                        database connection information. The easiest way to do this is to
189                                        make a copy the file <strong>defaultsettings.php</strong> (located
190                                        in the phpBMS application's root folder) and name the copied file
191                                        <strong>settings.php</strong>.
192                                </p>
193
194                                <p>Next, modify the following parameters inside the settings.php file to match your server:</p>
195
196                                <ul class="small">
197                                        <li><p><strong>mysql_server</strong></p>
198                                            <p>
199                                                The MySQL server location<br/>
200                                                In most cases, this should be the same location as the web server, i.e. &quot;localhost&quot;
201                                                </p>
202                                        </li>
203                                        <li>
204                                                <p><strong>mysql_database</strong></p>
205                                                <p>The name of the database to be used by phpBMS. <br />
206                                                If the database has not been created, you will be given the opportunity to create the database.</p>
207                                        </li>
208                                        <li>
209                                                <p><strong>mysql_user</strong></p>
210                                                <p>The name of the user PHP will use to access the database.</p>
211                                        </li>
212                                        <li>
213                                                <p><strong>mysql_userpass</strong></p>
214                                                <p>The password for the user PHP will use to access the database.</p>
215                                        </li>
216                                        <li>
217                                                <p><strong>mysql_pconnect</strong></p>
218                                                <p>(&quot;true&quot; or &quot;false&quot;) This tells phpBMS to use either the PHP mysql_pconnect or mysql_connect command. Some web hosting providers do not allow mysql_pconnect.</p>
219                                        </li>
220                                </ul>
221
222                        </div>
223
224
225                        <div class="steps" id="step3">
226                                <p class="nextprevP">
227                                        <button type="button" class="Buttons prevButtons">back</button>
228                                        <button type="button" class="Buttons nextButtons">next</button>
229                                </p>
230
231                                <h1>Test Database Connection</h1>
232                                <p>
233                                        Once the <strong>settings.php</strong> file has been created and the database connection information has been entered, test the connection.
234                                </p><p>
235                                        If connection fails, check
236                                        to make sure the <strong>settings.php</strong> is setup correctly. You may also want
237                                        to enable the installation debug to view specifics of why the connection is not working.
238                                </p>
239
240                                <p><input type="button" value="Test Connection" class="Buttons" id="testConnectionButton" /> <strong id="testConnectionNoDebug"></strong></p>
241
242                                <div class="debugResults">
243                                        <h3>Connection Test Results</h3>
244                                        <p><textarea name="results" id="testconnectionresults" cols="40" rows="4" class="results"></textarea></p>
245                                </div>
246
247                        </div>
248
249
250                        <div class="steps" id="step4">
251                                <p class="nextprevP">
252                                        <button type="button" class="Buttons prevButtons">back</button>
253                                        <button type="button" class="Buttons nextButtons">next</button>
254                                </p>
255
256                                <h1>Create the Database (Schema)</h1>
257
258                                <p>
259                                        If you have manually created the database (schema) specified in your
260                                        settings.php file (mysql_database) that phpBMS will use already exists,
261                                        you can <strong>skip this step</strong>.
262                                </p>
263
264                                <p>If the database (schema) that phpBMS will use does not already exist, phpBMS can attempt to create it for you.</p>
265
266                                <p class="notes">
267                                        <strong>Note:</strong> Some hosting companies limit the number of mySQL databases
268                                        you are allowed, control database creation through a web application, or allow
269                                        changes on a request basis. If you are having problems contact your hosting
270                                        company.
271                                </p>
272
273                                <p><input type="button" value="Create Database Schema" class="Buttons" id="createDatabaseButton"/> <strong id="createDatabaseNoDebug"></strong></p>
274
275                                <div class="debugResults">
276                                        <h3>Schema Creation Results</h3>
277                                        <p><textarea name="results" id="createdatabaseresults" cols="80" class="results"rows="4"></textarea></p>
278                                </div>
279
280                        </div>
281
282
283                        <div class="steps" id="step5">
284
285                                <p class="nextprevP">
286                                        <button type="button" class="Buttons prevButtons">back</button>
287                                        <button type="button" class="Buttons nextButtons">next</button>
288                                </p>
289
290                                <h1>Populate Core Data</h1>
291
292                                <p>
293                                        phpBMS needs to create the core functionality tables and
294                                        populate them with the default data needed to run the program.
295                                </p>
296
297                                <p>
298                                        <label for="appname">application name</label><br />
299                                        <input type="text" id="appname" value="phpBMS"/>
300                                </p>
301
302                                <p>
303                                        <label for="email">administrator e-mail address</label><br />
304                                        <input type="text" id="email" value=""/>
305                                </p>
306
307                                <p><input type="button" value="Install Core Data" class="Buttons" id="coreDataButton" /> <strong id="coreDataNoDebug"></strong></p>
308
309                                <div class="debugResults">
310                                        <h3>Core Data Population Results</h3>
311                                        <p><textarea name="results" id="coredatainstallresults" class="results" cols="80" rows="20"></textarea></p>
312                                </div>
313
314                        </div>
315
316                        <div class="steps" id="step6">
317
318                                <p class="nextprevP">
319                                        <button type="button" class="Buttons prevButtons">back</button>
320                                        <button type="button" class="Buttons nextButtons">next</button>
321                                </p>
322
323                                <h1>Install Modules</h1>
324
325                                <p>
326                                        The base phpBMS system contains <strong>only</strong> the basic framework, administration, and note/task/event capabilities.
327                                        Additional modules add functionality such as client and product management, sales orders, and mass e-mailing.
328                                        None of these modules are required for the phpBMS application to run, but functionality may be limited.
329                                </p>
330
331                                <p class="notes">
332                                        <strong>Note:</strong> The order in which modules is installed can be important.
333                                        Some modules may depend on other modules.  Check each of the requirements for a module before
334                                        installing it.
335                                </p>
336
337                                <h2>Available Modules</h2>
338
339                                <?php $moduleClass->displayInstallTable() ?>
340
341                                <div class="debugResults">
342                                        <h3>Module Installation Results</h3>
343                                        <p><textarea name="results" id="moduleinstallresults" class="results" cols="80" rows="10"></textarea></p>
344                                </div>
345
346                        </div>
347
348                        <div class="steps" id="step7">
349
350                                <p class="nextprevP">
351                                        <button type="button" class="Buttons prevButtons">back</button>
352                                        <button type="button" class="Buttons nextButtons">next</button>
353                                </p>
354
355                                <h1>Secure the Application</h1>
356
357                                <p>
358                                        phpBMS can contain sensitive information such as user names, passwords,
359                                        client data, and payment information that could be exposed to the internet
360                                        insecurely.
361                                </p>
362
363
364                                <h2>Required Security Steps</h2>
365
366                                <ul>
367                                        <li>
368                                                <h3>Delete Installation Folders</h3>
369                                                <p>
370                                                        You must delete both the core installation folder, as well as all modules' installation
371                                                        folders before you can use the system
372                                                </p>
373                                        </li>
374                                        <li>
375                                                <h3>Setup and Restrict Access to the Cron Script</h3>
376                                                <p>
377                                                    phpBMS has a scheduler function that runs items on a timed basis using cron
378                                                    or another scheduler program to run php via command line.  Check the
379                                                    Scheduler under the system menu after logging in for details on configuring this
380                                                    in your crontab file.  Once configured, you will want to disable your web server from
381                                                    allowing this file to be called from your web server (the outside).
382                                                </p>
383                                        </li>
384                                </ul>
385
386                                <h2>Additional Security Steps</h2>
387
388                                <ul>
389                                        <li>
390                                                <h3>Payment Information Encryption</h3>
391                                                <p>
392                                                    If you plan on storing sensitive payment information such as credit card
393                                                    numbers make sure to enable the encrption option in the configuration page
394                                                    underneath the BMS module section. You will also need to create and link
395                                                    to an external file on the server that contains the encryption key. Typically,
396                                                    encyrption key files are text files containing a 64-128 character hash.
397                                                </p>
398                                        </li>
399
400                                        <li>
401                                                <h3>Run phpBMS On a Secure Connection (SSL)</h3>
402                                                <p>
403                                                        Make sure that usernames, passwords, credit card and other
404                                                        sensitive information are not passed in clear text over the internet
405                                                        by running phpBMS over a secure socket layer.
406                                                        Even if phpBMS is not exposed to the Internet, and is setup on a
407                                                        local LAN, we recommend running it over SSL.
408                                                </p>
409                                        </li>
410
411                                        <li>
412                                                <h3>Limit Access to the Application</h3>
413                                                <p>
414                                                        phpBMS is not designed to be used as a client
415                                                        portal.  Allowing clients the ability to log in
416                                                        to our system could give access to sensitive
417                                                        information to clients, vendors, or sales partners.
418                                                </p>
419                                        </li>
420                                </ul>
421
422                        </div>
423
424                        <div class="steps" id="step8">
425
426                                <p class="nextprevP">
427                                        <button type="button" class="Buttons prevButtons">back</button>
428                                        <button type="button" class="disabledButtons nextButtons" disabled="disabled">next</button>
429                                </p>
430
431                                <h1>Complete Installation</h1>
432
433
434                                <h2>Administrator Information</h2>
435                                <table id="userpassTable">
436                                        <tbody>
437                                                <tr>
438                                                        <td align="right">login: </td>
439                                                        <td ><strong>admin</strong></td>
440                                                </tr>
441                                                <tr>
442                                                        <td align="right">password: </td>
443                                                        <td ><strong id="pass2">no password set</strong></td>
444                                                </tr>
445                                        </tbody>
446                                </table>
447
448                                <p class="notes">
449                                        <strong>Note:</strong> Remember to remove the install folder and any modules' install folder
450                                        before logging in. You may want to write down the password above before navigating to the
451                                        <a href="../" >application page</a>.
452                                </p>
453
454                                <h2>Troubleshooting</h2>
455                                <h3>General Help </h3>
456                                <p>
457                                If you have problems during installation, have questions about how the program works, or would like additional
458                                information about phpBMS, please visit the <a href="http://www.phpbms.org">phpBMS Project web site</a>.  The phpBMS project web site
459                                has many resources to help you including a user wiki, users forum, and mailing list that can help you.</p>
460                                <h3>Paid Installation and Support Options</h3>
461                                <p>Paid technical support and phpBMS customization is available from <a href="http://www.kreotek.com">Kreotek</a></p>
462
463                                <h2>Help Make phpBMS Better!</h2>
464
465                                <h3>Registration</h3>
466
467                                <p>
468                                    Take the time to register your copy of phpBMS.  Registration helps
469                                    guide future development of the project so we can continue to make
470                                    focus on the communities needs.
471                                </p>
472                                <p id="registerP">Take a minute to <a href="http://kreotek.com/registerphpbms">register your copy of phpBMS</a> today.</p>
473
474                                <h3>Contribute</h3>
475
476                                <p>
477                                    phpBMS is true open source software.  Contributions in the form of code patches, new modules,
478                                    documentation, and bug reporting are always appreciated.  You can find out more about
479                                    contributing to the project at <a href="http://www.phpbms.org">community web site</a>.
480                                </p>
481
482                        </div>
483                </div>
484        </div>
485
486
487<p align="center" class="tiny">$Rev: 392 $ | $LastChangedDate: 2008-05-13 17:06:00 -0600 (Tue, 13 May 2008) $</p>
488</body>
489</html>
Note: See TracBrowser for help on using the browser.
Scanned by Orvant Copyright © 2010 Kreotek, LLC. All Rights reserved.