01-12-2010, 09:56 PM
maiwurd
2008-09-12 16:38:26 PDT
I installed the Open Document Management app on my Linux box;
Went to my browser to run the install script.
This is the msg I get...
"Checking that templates_c folder is writeable... OK
installing...
Unable to connect!"
I have set the permissions in MySQL and the ODM db as well as created hosts permissions.
What am I in need of.
Here is the config.php file:
<?php
/*
config.php - OpenDocMan main config file
Copyright © 2002, 2003, 2004 Stephen Lawrence, Khoa Nguyen
Copyright © 2005-2007 Stephen Lawrence
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*
DO NOT EDIT THIS FILE DIRECTLY - MAKE ANY CHANGES BY COPYING config_local.php.samle
TO config_local.php AND ADDING CUSTOM SETTINGS THERE. THE SETTINGS HERE ARE
DEFAULTS and will be overwritten during an upgrade.
*/
// Eliminate multiple inclusion of config.php
if( !defined('config') )
{
define('config', 'true', false);
// config.php - useful variables/functions
// Database Settings
$GLOBALS['database'] = 'opendocman'; // Enter the name of the database here
$GLOBALS['user'] = 'root'; // Enter the username for the database
$GLOBALS['pass'] = 'pass'; // Enter the password for the username
$GLOBALS['hostname'] = 'mydomain.com'; // Enter the hostname that is serving the database
global $CONFIG; $CONFIG = array(
'debug' => '0',
// This setting is for a demo installation, where random people will be
// all loggging in as the same username/password like 'demo/demo'. This will
// keep users from removing files, users, etc.
'demo' => 'false',
// This is useful if you have a web-based kerberos authenticatio site
// Set to either kerbauth or mysql
//'authen' => 'kerbauth',
'authen' => 'mysql',
// Set the number of files that show up on each page
'page_limit' => '15',
// Set the number of page links that show up on each page
'num_page_limit' => '10',
// Set the maximum displayable length of text field
'displayable_len' => '15',
// Set this to the url of the site
// No need for trailing "/" here
'base_url' => 'http://mydomain.com/opendocman',
// This is the browser window title
'title' => 'Document Repository',
// The email address of the administrator of this site
'site_mail' => 'root@localhost',
//This variable sets the root username. The root user will be able to access
//all files and have authority for everything.
'root_username' => 'admin',
// location of file repository
// This should ideally be outside the Web server root.
// Make sure the server has permissions to read/write files to this folder!
// Uncomment this one for Windows - Don't forget the trailing backslash "\"
//'dataDir' => 'c:\document_repository\',
// Uncomment this one for Linux - Don't forget the trailing slash "/"
'dataDir' => '/var/www/document_repository/',
// Set the maximum file upload size
'max_filesize' => '5000000',
//This var sets the amount of days until each file needs to be revised,
//assuming that there are 30 days in a month for all months.
'revision_expiration' => '90',
/* Choose an action option when a file is found to be expired
The first two options also result in sending email to reviewer
(1) Remove from file list until renewed
(2) Show in file list but non-checkoutable
(3) Send email to reviewer only
(4) Do Nothing
*/
'file_expired_action' => '1',
//Authorization control: On or Off (case sensitive)
//If set On, every document added or checked back must be reviewed by an admin
//before it can go public. To disable this review queue, set this variable to Off.
//When set to Off, all newly added or checked back in documents will immediately go public
'authorization' => 'On',
//Secure URL control: On or Off (case sensitive)
//When set to 'On', all urls will be secured
//When set to 'Off', all urls are normal and readable
'secureurl' => 'On',
// should we display document listings in the normal way or in a tree view
// this must be 'On' to change the display
'treeview' => 'Off',
// should we display the signup link?
'allow_signup' => 'On',
// should we allow users to reset their forgotten password?
'allow_password_reset' => 'Off',
// Attempt NIS password lookups?
'try_nis' => 'Off',
// Which theme to use?
'theme' => 'default'
);
// List of allowed file types
// Pay attention to the "Last Message:" in the status bar if your file is being rejected
// because of its file type. It should display the proper MIME type there, and you can
// then add that string to this list to allow it
$GLOBALS['allowedFileTypes'] = array('image/gif', 'text/html', 'text/plain', 'application/pdf', 'application/x-pdf', 'application/x-lyx', 'application/msword', 'image/jpeg', 'image/pjpeg', 'image/png', 'application/msexcel', 'application/msaccess', 'text/richtxt', 'application/mspowerpoint', 'application/octet-stream', 'application/x-zip-compressed','image/tiff','image/tif','application/vnd.ms-powerpoint');
// <----- No need to edit below here ---->
//
// Encourage end-users to put local configuration in config_local.php, so
// we can overwrite (config.php) in the future
// without danger of overwriting site specific information.
if (is_file('config_local.php'))
{
include('config_local.php');
}
elseif (is_file('../config_local.php'))
{
include('../config_local.php');
}
// Set the revision directory. (relative to $dataDir)
$CONFIG['revisionDir'] = $GLOBALS['CONFIG']['dataDir'] . 'revisionDir/';
// Set the revision directory. (relative to $dataDir)
$CONFIG['archiveDir'] = $GLOBALS['CONFIG']['dataDir'] . 'archiveDir/';
$GLOBALS['connection'] = mysql_connect($GLOBALS['hostname'], $GLOBALS['user'], $GLOBALS['pass']) or die ("Unable to connect: " . mysql_error());
$db = mysql_select_db($GLOBALS['database'], $GLOBALS['connection']);
// All functions and includes are in functions.php
include_once('functions.php');
}
?>
logart
2008-09-13 08:53:29 PDT
That error messages is related the MySQL datbase. Looks like maybe your database hostname is incorrect.
maiwurd
2008-09-14 17:16:00 PDT
Are you saying the hostname should be "localhost" which is the default value?
Note the line in the config file:
-
$GLOBALS['hostname'] = 'mydomain.com'; // Enter the hostname that is serving the database
-
mydomain.com is not a literal representation.
I change the text to protect my domain on this public forum.......it is the name of the domain used for serving our web page email and now ODM. There is only one domain on this box.
jonathanwminer
2008-09-15 06:31:07 PDT
Are you running the database on the same machine as ODM?
If yes, then the database hostname should be left as "localhost".
If no, the the database hostname should be the fully qualified name of the database host. Maybe something like "host.mydomain.com". In this case you also need to double check that the database server is configured to listen to for TCP connections from remote hosts, and that any firewalls between the ODM server and database server will allow the database traffic.
- Jon
maiwurd
2008-09-16 12:34:50 PDT
Thank you so much. I have it up and now I find we can not upload MS Office documents to the application. Do I need to set up Samba for the Document Repository and if so what is the step by step process?
I am fairly new to Samba and the configuration needed for ODM.
jonathanwminer
2008-09-16 12:52:23 PDT
There is no need to configure Samba, OpenDocMan is strictly web based. Document uploads and downloads occur via the web browser.
Is ODM displaying an error mesage?
Have you looked at your webserver's log files?
Did files get created in your dataDir?
Did tables get updated within MySQL?
The most common problem with uploads has to do with mimetype configuration.
maiwurd
2008-09-16 14:16:18 PDT
Is ODM displaying an error mesage?
Have you looked at your webserver's log files? In the error log I found this:
[Tue Sep 16 13:45:19 2008] [error] [client 6.1.4.1] PHP Notice: Undefined variable: install_msg in /var/www/mydomain.l.com/opendocman/index.php on line 167, referer: <!-- m --><a class="postlink" href="http://mydomain..com/opendocman/search.php?aku=a2V5d29yZD0md2hlcmU9YWxsJnN1Ym1pdD1TZWFyY2gmc3VibWl0PVNlYXJjaA==">http://mydomain..com/opendocman/search. ... NlYXJjaA==</a><!-- m -->
[Tue Sep 16 13:45:48 2008] [error] [client 6.1.4.1] PHP Warning: POST Content-Length of 34000090 bytes exceeds the limit of 8388608 bytes in Unknown on line 0, referer: <!-- m --><a class="postlink" href="http://mydomain.com/opendocman/add.php">http://mydomain.com/opendocman/add.php</a><!-- m -->?
Did files get created in your dataDir? No.
Did tables get updated within MySQL? No.
The most common problem with uploads has to do with mimetype configuration.
Where do I check the mimetype configuration?
jonathanwminer
2008-09-16 14:27:26 PDT
The webserver errorlog shows a problem with the filesize of your upload. Change your configuration to allow for larger uploads. Check three things:
OpenDocMan: max_filesize
Apache: LimitRequestBody
PHP: post_max_size
maiwurd
2008-09-16 15:28:55 PDT
Awesome - All is working as it should. Thank you so much.
2008-09-12 16:38:26 PDT
I installed the Open Document Management app on my Linux box;
Went to my browser to run the install script.
This is the msg I get...
"Checking that templates_c folder is writeable... OK
installing...
Unable to connect!"
I have set the permissions in MySQL and the ODM db as well as created hosts permissions.
What am I in need of.
Here is the config.php file:
<?php
/*
config.php - OpenDocMan main config file
Copyright © 2002, 2003, 2004 Stephen Lawrence, Khoa Nguyen
Copyright © 2005-2007 Stephen Lawrence
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*
DO NOT EDIT THIS FILE DIRECTLY - MAKE ANY CHANGES BY COPYING config_local.php.samle
TO config_local.php AND ADDING CUSTOM SETTINGS THERE. THE SETTINGS HERE ARE
DEFAULTS and will be overwritten during an upgrade.
*/
// Eliminate multiple inclusion of config.php
if( !defined('config') )
{
define('config', 'true', false);
// config.php - useful variables/functions
// Database Settings
$GLOBALS['database'] = 'opendocman'; // Enter the name of the database here
$GLOBALS['user'] = 'root'; // Enter the username for the database
$GLOBALS['pass'] = 'pass'; // Enter the password for the username
$GLOBALS['hostname'] = 'mydomain.com'; // Enter the hostname that is serving the database
global $CONFIG; $CONFIG = array(
'debug' => '0',
// This setting is for a demo installation, where random people will be
// all loggging in as the same username/password like 'demo/demo'. This will
// keep users from removing files, users, etc.
'demo' => 'false',
// This is useful if you have a web-based kerberos authenticatio site
// Set to either kerbauth or mysql
//'authen' => 'kerbauth',
'authen' => 'mysql',
// Set the number of files that show up on each page
'page_limit' => '15',
// Set the number of page links that show up on each page
'num_page_limit' => '10',
// Set the maximum displayable length of text field
'displayable_len' => '15',
// Set this to the url of the site
// No need for trailing "/" here
'base_url' => 'http://mydomain.com/opendocman',
// This is the browser window title
'title' => 'Document Repository',
// The email address of the administrator of this site
'site_mail' => 'root@localhost',
//This variable sets the root username. The root user will be able to access
//all files and have authority for everything.
'root_username' => 'admin',
// location of file repository
// This should ideally be outside the Web server root.
// Make sure the server has permissions to read/write files to this folder!
// Uncomment this one for Windows - Don't forget the trailing backslash "\"
//'dataDir' => 'c:\document_repository\',
// Uncomment this one for Linux - Don't forget the trailing slash "/"
'dataDir' => '/var/www/document_repository/',
// Set the maximum file upload size
'max_filesize' => '5000000',
//This var sets the amount of days until each file needs to be revised,
//assuming that there are 30 days in a month for all months.
'revision_expiration' => '90',
/* Choose an action option when a file is found to be expired
The first two options also result in sending email to reviewer
(1) Remove from file list until renewed
(2) Show in file list but non-checkoutable
(3) Send email to reviewer only
(4) Do Nothing
*/
'file_expired_action' => '1',
//Authorization control: On or Off (case sensitive)
//If set On, every document added or checked back must be reviewed by an admin
//before it can go public. To disable this review queue, set this variable to Off.
//When set to Off, all newly added or checked back in documents will immediately go public
'authorization' => 'On',
//Secure URL control: On or Off (case sensitive)
//When set to 'On', all urls will be secured
//When set to 'Off', all urls are normal and readable
'secureurl' => 'On',
// should we display document listings in the normal way or in a tree view
// this must be 'On' to change the display
'treeview' => 'Off',
// should we display the signup link?
'allow_signup' => 'On',
// should we allow users to reset their forgotten password?
'allow_password_reset' => 'Off',
// Attempt NIS password lookups?
'try_nis' => 'Off',
// Which theme to use?
'theme' => 'default'
);
// List of allowed file types
// Pay attention to the "Last Message:" in the status bar if your file is being rejected
// because of its file type. It should display the proper MIME type there, and you can
// then add that string to this list to allow it
$GLOBALS['allowedFileTypes'] = array('image/gif', 'text/html', 'text/plain', 'application/pdf', 'application/x-pdf', 'application/x-lyx', 'application/msword', 'image/jpeg', 'image/pjpeg', 'image/png', 'application/msexcel', 'application/msaccess', 'text/richtxt', 'application/mspowerpoint', 'application/octet-stream', 'application/x-zip-compressed','image/tiff','image/tif','application/vnd.ms-powerpoint');
// <----- No need to edit below here ---->
//
// Encourage end-users to put local configuration in config_local.php, so
// we can overwrite (config.php) in the future
// without danger of overwriting site specific information.
if (is_file('config_local.php'))
{
include('config_local.php');
}
elseif (is_file('../config_local.php'))
{
include('../config_local.php');
}
// Set the revision directory. (relative to $dataDir)
$CONFIG['revisionDir'] = $GLOBALS['CONFIG']['dataDir'] . 'revisionDir/';
// Set the revision directory. (relative to $dataDir)
$CONFIG['archiveDir'] = $GLOBALS['CONFIG']['dataDir'] . 'archiveDir/';
$GLOBALS['connection'] = mysql_connect($GLOBALS['hostname'], $GLOBALS['user'], $GLOBALS['pass']) or die ("Unable to connect: " . mysql_error());
$db = mysql_select_db($GLOBALS['database'], $GLOBALS['connection']);
// All functions and includes are in functions.php
include_once('functions.php');
}
?>
logart
2008-09-13 08:53:29 PDT
That error messages is related the MySQL datbase. Looks like maybe your database hostname is incorrect.
maiwurd
2008-09-14 17:16:00 PDT
Are you saying the hostname should be "localhost" which is the default value?
Note the line in the config file:
-
$GLOBALS['hostname'] = 'mydomain.com'; // Enter the hostname that is serving the database
-
mydomain.com is not a literal representation.
I change the text to protect my domain on this public forum.......it is the name of the domain used for serving our web page email and now ODM. There is only one domain on this box.
jonathanwminer
2008-09-15 06:31:07 PDT
Are you running the database on the same machine as ODM?
If yes, then the database hostname should be left as "localhost".
If no, the the database hostname should be the fully qualified name of the database host. Maybe something like "host.mydomain.com". In this case you also need to double check that the database server is configured to listen to for TCP connections from remote hosts, and that any firewalls between the ODM server and database server will allow the database traffic.
- Jon
maiwurd
2008-09-16 12:34:50 PDT
Thank you so much. I have it up and now I find we can not upload MS Office documents to the application. Do I need to set up Samba for the Document Repository and if so what is the step by step process?
I am fairly new to Samba and the configuration needed for ODM.
jonathanwminer
2008-09-16 12:52:23 PDT
There is no need to configure Samba, OpenDocMan is strictly web based. Document uploads and downloads occur via the web browser.
Is ODM displaying an error mesage?
Have you looked at your webserver's log files?
Did files get created in your dataDir?
Did tables get updated within MySQL?
The most common problem with uploads has to do with mimetype configuration.
maiwurd
2008-09-16 14:16:18 PDT
Is ODM displaying an error mesage?
Have you looked at your webserver's log files? In the error log I found this:
[Tue Sep 16 13:45:19 2008] [error] [client 6.1.4.1] PHP Notice: Undefined variable: install_msg in /var/www/mydomain.l.com/opendocman/index.php on line 167, referer: <!-- m --><a class="postlink" href="http://mydomain..com/opendocman/search.php?aku=a2V5d29yZD0md2hlcmU9YWxsJnN1Ym1pdD1TZWFyY2gmc3VibWl0PVNlYXJjaA==">http://mydomain..com/opendocman/search. ... NlYXJjaA==</a><!-- m -->
[Tue Sep 16 13:45:48 2008] [error] [client 6.1.4.1] PHP Warning: POST Content-Length of 34000090 bytes exceeds the limit of 8388608 bytes in Unknown on line 0, referer: <!-- m --><a class="postlink" href="http://mydomain.com/opendocman/add.php">http://mydomain.com/opendocman/add.php</a><!-- m -->?
Did files get created in your dataDir? No.
Did tables get updated within MySQL? No.
The most common problem with uploads has to do with mimetype configuration.
Where do I check the mimetype configuration?
jonathanwminer
2008-09-16 14:27:26 PDT
The webserver errorlog shows a problem with the filesize of your upload. Change your configuration to allow for larger uploads. Check three things:
OpenDocMan: max_filesize
Apache: LimitRequestBody
PHP: post_max_size
maiwurd
2008-09-16 15:28:55 PDT
Awesome - All is working as it should. Thank you so much.