Skip to content

Commit

Permalink
1.2.5.3 tag
Browse files Browse the repository at this point in the history
  • Loading branch information
logart committed Feb 3, 2010
1 parent 6ff9a99 commit cf4448f
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 112 deletions.
2 changes: 1 addition & 1 deletion docs/developers.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
developers.txt - notes for developers
Copyright (C) 2002-2007 Stephen Lawrence
Copyright (C) 2002-2010 Stephen Lawrence

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
73 changes: 17 additions & 56 deletions docs/opendocman.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,9 @@ centralized repository.

1.2 Requirements

* Apache Webserver 1.3.x (or any other webserver, that supports
PHP) (http://www.apache.org/)
* Apache Webserver 2.x (or any other webserver, that supports PHP) (http://www.apache.org/)

* MySQL Server 3.22+ (http://www.mysql.com/)
* MySQL Server 4.0+ (http://www.mysql.com/)

* PHP 4+ compiled with MySQL-Support (http://www.php.net/)

Expand Down Expand Up @@ -149,53 +148,18 @@ To update your current version to the latest release:
(a) All parameters are commented and should be self explanatory.
Change any that apply, especially the database parameters.

3. If you DO have database creation permissions to your MySQL
database then you can use the automatic installation script (preferred
method).
3. Make a directory for the files to be stored that is accessible
to the web server but not available by browsing. Ensure the
permissions are correct on this folder to allow for the web
server to write to it

(a) Load the installation page in your web browser at /install/
(ex. http://www.example.com/opendocman/install ) and click on the
new install link.

(b) Enter the username and password of a user that has database
creation permissions for the database configured in
config.php

(c) Skip step 4 and move on to step 5

4. If you DO NOT have database creation permissions, be advised
that you should be carefull in doing things manually

(a) NOTE: The entries below are just examples.

(b) create a MySQL-database and MySQL-User for opendocman

$> mysql -u root -p

Welcome to the MySQL monitor. Commands end with ; or
\g.

Your MySQL connection id is 5525 to server version: 3.22.32

Type 'help' for help.

mysql> create database opendocman;

mysql> grant select,insert,update,delete,create on opendocman.*
to opendocman@localhost identified by 'opendocman';

mysql> flush privileges;
ex. $>mkdir /usr/local/opendocman/data

mysql> exit;

$> mysql -u opendocman -p opendocman < database.sql

5. Make a directory for the files to be stored that is accessible
to the web server but not available by browsing

$>mkdir /usr/local/opendocman/data
4. Load the installation page in your web browser at /install/
(ex. http://www.example.com/opendocman/install ) and click on the
new install link.

6. Point your favorite webbrowser to the opendocman folder:
5. Point your favorite webbrowser to the opendocman folder:
ex. "http://www.mydomain.com/opendocman"

7. Login as "admin" (without password). After that, go to
Expand All @@ -220,8 +184,12 @@ options in that file:

* $pass - Password for above user

* $hostname - The hostname of the database server (ex. db1.mydomain.com)
* $hostname - The hostname:port of the database server (ex. db1.mydomain.com or db1.mydomain.com:8889)

* dataDir - Location of file repository. This should ideally
be outside the Web server root. Make sure the server has
permissions to read/write files in this folder!

* demo - This setting is for a demo installation, where random
people will be all loggging in as the same username/password
like 'demo/demo'.
Expand Down Expand Up @@ -272,10 +240,6 @@ options in that file:
with the header.tpl and footer.tpl files. Global variables are
added to smarty as $g_VARIABLENAME.

* dataDir - Location of file repository. This should ideally
be outside the Web server root. Make sure the server has
permissions to read/write files in this folder!

* $allowedFileTypes - This is a list of file types that will
be allowed to be added to the repository. This may need
some tweeking depending on what types of files your users
Expand Down Expand Up @@ -353,10 +317,7 @@ for users:

2. For a new installation:

(a) The user will be prompted to enter a priviledged mysql
username and password. This is for the database creation
and grant assignments. The script will then proceed
to install all the necessary data structures and default
(a) The script will proceed to install all the necessary data structures and default
data entries for the most current version of ODM.

3. For updates:
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ functions.php - various utility functions
require_once('secureurl.class.php');
include_once('secureurl.php');
include('udf_functions.php');
require_once('includes/sanitize.inc.php');
//require_once('includes/sanitize.inc.php');
if( !defined('function') )
{
define('function', 'true', false);
Expand Down
68 changes: 15 additions & 53 deletions install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
switch(@$_REQUEST['op']) {

case "install":
get_info();
do_install();
break;

case "commitinstall":
do_install();

break;
// User has version 1.0 and is upgrading
case "update_10":
Expand Down Expand Up @@ -124,32 +124,6 @@
break;
}




function get_info()
{
?>
Please complete the following form to create your new database
<form name="newinstall" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<table align="center">
<tr>
<td>
<input type="text" name="rootname" value="root"> Mysql Root User <br>
<input type="password" name="rootpass"> Mysql Root Password <br>
<input type="text" name="roothost" value="localhost"> Mysql Hostname <br>
<input type="text" name="database" value="opendocman"> New Database Name <br>
<input type="text" name="username" value="opendocman"> New Database User Name<br>
<input type="password" name="password"> New Database Password<br>
<input type="submit" name="op" value="commitinstall"><br>
</td>
</tr>
</table>
</form>

<?php
}

function do_install()
{
echo 'Checking that templates_c folder is writeable... ';
Expand All @@ -165,44 +139,32 @@ function do_install()
echo '<br />installing...<br>';


mysql_connect($_REQUEST['roothost'], $_REQUEST['rootname'], $_REQUEST['rootpass']) or die ("Unable to connect!");
include_once("../config.php");

mysql_connect($GLOBALS['hostname'], $GLOBALS['user'], $GLOBALS['pass']) or die ("Unable to connect!");

// Create database
$result = mysql_query("
DROP DATABASE IF EXISTS $_REQUEST[database]
") or die("<br>Unable to Create Database - Error in query:" . mysql_error());

$result = mysql_query("
CREATE DATABASE $_REQUEST[database]
") or die("<br>Unable to Create Database - Error in query:" . mysql_error());
$result = mysql_query("DROP DATABASE IF EXISTS {$GLOBALS['database']}")
or die("<br>Unable to Create Database - Error in query:" . mysql_error());

echo 'Database Created<br>';
$result = mysql_query("CREATE DATABASE {$GLOBALS['database']}")
or die("<br>Unable to Create Database - Error in query:" . mysql_error());

mysql_select_db($_REQUEST['database']) or die (mysql_error() . "<br>Unable to select database.</font>");
echo 'Database Created<br />';

echo 'Database Selected<br>';
mysql_select_db($GLOBALS['database']) or die (mysql_error() . "<br>Unable to select database.</font>");

// Grant privs
$result = mysql_query("
GRANT ALL ON $_REQUEST[database].* to $_POST[username]@$_POST[roothost] identified by '$_REQUEST[password]'") or die("<br>Could not set GRANT;
");
echo 'Grant is set<br>';
echo 'Database Selected<br />';

$result = mysql_query("
FLUSH PRIVILEGES
") or die("<br>Unable to Create Database - Error in query:" . mysql_error());

include("../config.php");
include("odm.php");
include_once("odm.php");
echo 'All Done with installation! Click <a href="' . $GLOBALS['CONFIG']['base_url'] . '">HERE</a> to login';
} // End Install


function do_update_10()
{
echo 'Updating version 1.0<br>';

// Call each version, starting with th oldest. Upgrade from one to the next until done
// Call each version, starting with the oldest. Upgrade from one to the next until done
//include("install/upgrade_09.php");
include("../config.php");
include("upgrade_10.php");
Expand Down Expand Up @@ -295,7 +257,7 @@ function print_intro()
<td>Please choose one from the following based on your current version <?php echo $GLOBALS['CONFIG']['current_version']; ?> (look in your config.php for your version prior to 1.2.5). <br />After 1.2.4 check in the file "version.php":<br><br></td>
</tr>
<tr>
<td><a href="index.php?op=install">New installation of the v<?php echo $GLOBALS['CONFIG']['current_version']; ?> release of OpenDocMan (Will wipe any current data!)</a><br><br></td>
<td><a href="index.php?op=install" onClick="javascript: alert('are you sure? This will wipe out the database you have configured in config.php. Only use this option for a FRESH INSTALL.');">New installation of the v<?php echo $GLOBALS['CONFIG']['current_version']; ?> release of OpenDocMan (Will wipe any current data!)</a><br><br></td>
</tr>
<tr>
<td><a href="index.php?op=update_125">Upgrade from version 1.2.5</a><br><br></td>
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

$GLOBALS['CONFIG']['current_version'] = '1.2.5.2';
$GLOBALS['CONFIG']['current_version'] = '1.2.5.3';
?>

0 comments on commit cf4448f

Please sign in to comment.