Koozali.org: home of the SME Server
Obsolete Releases => SME Server 8.x => Topic started by: fpausp on December 12, 2010, 07:58:32 PM
-
Hi, I try to install KnowledgeTree (Document Management Software) on SME8b6 and like to ask if anyone is interested in a DMS and like to help me ?
What I have tried until now is:
# Goto /usr/local/src and download the files
cd /usr/local/src
wget -c http://kt-download.s3.amazonaws.com/kt/3.7.0.2/kt-src-oss-3.7.0.2.tgz
# untar the file
tar xvf kt-src-oss-3.7.0.2.tgz
# move it to /opt/kt/
mv /usr/local/src/kt*/ /opt/kt/
# delete
rm -f kt-src-oss-3.7.0.2.tgz
# install php-xmlrpc
yum -y install php-xmlrpc
# change permissions
chown -R www.www /opt/kt
chmod 777 /opt/kt/config/config.ini
chmod 777 -R /opt/kt/var
# create the mysqluser dms
mysql -e "grant all privileges on dms.* to dms@localhost identified by 'password'"
mysql -e "flush privileges"
# create a Template Fragement
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
# use nano to make the template-file
nano 88kt
### Begin - Content of 88kt
# KnowledgeTree Document Management
Alias /kt /opt/kt
<Directory /opt/kt>
order deny,allow
deny from all
allow from all
AuthName "kt"
AuthType Basic
AuthExternal pwauth
Satisfy all
AddType application/x-httpd-php .php .php3 .phtml
php_admin_value open_basedir /opt/kt/config/:/tmp
</Directory>
### End - Content of 88kt
# Expand the Template
expand-template /etc/httpd/conf/httpd.conf
/etc/rc.d/init.d/httpd-e-smith restart
After these steps I can start the installationwizzard from kt but when It is finished I get some php-errors. Tomorow I will start from scratch and post the errors.
-
Hi,
I was able to install KnowledgeTree under the Primary ibay but when i try to install it under /opt/KnowledgeTree I get errors like:
Warning: realpath() [function.realpath]: open_basedir restriction in effect. File(/opt) is not within the allowed path(s): (/opt/knowledgeTree:/tmp) in /opt/knowledgeTree/config/dmsDefaults.php on line 86
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /opt/knowledgeTree/config/dmsDefaults.php:86) in /opt/knowledgeTree/ktapi/ktapi.inc.php on line 44
Warning: Cannot modify header information - headers already sent by (output started at /opt/knowledgeTree/config/dmsDefaults.php:86) in /opt/knowledgeTree/config/dmsDefaults.php on line 315
Any suggestions ?
-
Please post in the proper forums, since you question is concerning SME Server 8 I am moving this to SME Server 8.x where it is more appropriate.
-
your problem is "openbase_dir"... searching for it on forums I got: http://forums.contribs.org/index.php?topic=21963.0
For security reasons, php is unable to access anything outside directory it started (and below).
Change that could be a security treat.
By you error message, the script is trying to access /opt and is just allowed to access (/opt/knowledgeTree:/tmp).
So or do you change the path the script is trying to access on line 86 or add /opt int PHPBase using someting like:
/sbin/e-smith/db accounts setprop your_i-bay_name PHPBaseDir /opt/knowledgeTree:/tmp:/opt/
/sbin/e-smith/signal-event ibay-modify your_i-bay_name
Good luck
Regards
Jáder
-
"...Cannot modify header information - headers already sent..."
Possibly due to gzip compression, this needs to be first:
<?php
ob_start('ob_gzhandler');
# ...whatever
ob_end_flush();
?>
-
"...Cannot modify header information - headers already sent..."
Possibly due to gzip compression, this needs to be first:
<?php
ob_start('ob_gzhandler');
# ...whatever
ob_end_flush();
?>
In this case it seems more likely to me that the error being printed to the screen is the case.
-
In this case it seems more likely to me...
A suggestion, for which the OP asked, no more or less
particularly without knowing or viewing the files' content.
Seemed more likely to me that given the OP's lack of
knowledge of very basic open_basedir stuff then the
OP would appreciate just such a pointer.
-
Hi all,
@jader
/sbin/e-smith/db accounts setprop your_i-bay_name PHPBaseDir /opt/knowledgeTree:/tmp:/opt/
/sbin/e-smith/signal-event ibay-modify your_i-bay_name
I tried the db commands on the old installation and still got the php-errors.
I made a new installation and added the /opt/ into the template fragment, I think it is taken effect now.
@piran
<?php
ob_start('ob_gzhandler');
# ...whatever
ob_end_flush();
?>
I am sorry should I do something with it ?
I have done another installation with this commands:
# download and untar the files
cd /usr/local/src
wget -c http://kt-download.s3.amazonaws.com/kt/3.7.0.2/kt-src-oss-3.7.0.2.tgz
tar xvf kt-src-oss-3.7.0.2.tgz
mv /usr/local/src/kt*/ /opt/knowledgeTree/
rm -f kt-src-oss-3.7.0.2.tgz
# Install php-xmlrpc
yum -y install php-xmlrpc
# change permissions
chown -R www.www /opt/knowledgeTree
chmod 777 /opt/knowledgeTree/config/config.ini
chmod 777 -R /opt/knowledgeTree/var
# create mysql-user
mysql -e "grant all privileges on dms.* to dms@localhost identified by 'password'"
mysql -e "flush privileges"
# Create a Template Fragement
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
nano 88knowledgeTree
------------------- content of 88knowledgeTree-----------------------
# KnowledgeTree Document Management
Alias /knowledgeTree /opt/knowledgeTree
<Directory /opt/knowledgeTree>
AllowOverride All
order deny,allow
deny from all
allow from all
AuthName "knowledgeTree"
AuthType Basic
AuthExternal pwauth
Satisfy all
AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps
php_admin_value open_basedir /opt/knowledgeTree:/tmp:/opt/
</Directory>
------------------- content of 88knowledgeTree-----------------------
Save by pressing Ctrl x, press y to save changes and press enter
# expand template
expand-template /etc/httpd/conf/httpd.conf
/etc/rc.d/init.d/httpd-e-smith restart
# goto the wizzard
http://192.168.1.245/knowledgeTree
# after the wizzard
signal-event post-upgrade; signal-event reboot
Situation now is:
http://<server-ip>/knowledgeTree returns with:
Not Found
The requested URL /customerrorpage.php was not found on this server.
-
@piranI am sorry should I do something with it ?
Use the hint to learn something about output buffering?
http://php.net/manual/en/function.ob-start.php
Situation now is:
http://<server-ip>/knowledgeTree returns with: Not Found
The requested URL /customerrorpage.php was not found on this server.
So, the clue is in the error syntax, just put one there...
<?php
header("HTTP/1.1 404 NOT FOUND");
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
echo '<head>';
echo '<meta http-equiv="content-type" content="text/html; charset=UTF-8">';
echo '<title>NOT FOUND</title>';
echo '<meta name="description" content="NOT FOUND">';
echo '<meta name="keywords" content="NOT FOUND">';
echo '<meta name="robots" content="noindex,nofollow,noarchive,nosnippet">';
echo '</head>';
echo '<body>';
echo '*NOT FOUND*';
echo '</body>';
echo '</html>';
?>
-
I have working KnowledgeTree installation on my SME7 server. Not sure of it helps with your problem, but my httpd.conf template part is as follows:
Alias /knowledgeTree /opt/knowledgeTree
<Directory /opt/knowledgeTree>
AddHandler php5-cgi .php
Action php5-cgi /php5-cgi/php-cgi
Options Indexes
AllowOverride All
Order Deny,Allow
Deny from All
Allow from 127.0.0.1 10.1.0.0/255.255.255.0
php_flag magic_quotes_gpc off
php_flag upload_tmp_dir /opt/knowledgeTree/tmp
php_value include_path '.:/opt/knowledgeTree'
</Directory>
-
Hi Marco,
I had the same idea yesterday and installed kt (3.1b) on my virtual sme7, i will test this in a few days on sme8.
Merry Christmas
-
I installed kt (3.1b) on my virtual sme7
I am running KnowledgeTree Version 3.7.0.2 (Community Edition)
And a Merry Christmas to you too.
Regards,
Marco
-
Hi all,
I finished my work with the ChristmasTree and KnowledgeTree :-)
I wrote a little script located on:
http://www.netztechnik.at/download/sme8/howto/knowledgeTree/inst-kt.sh
Please test it on your own risk and feel free to give me feedback to make it better.
Regards
-
IMO this should be posted in the wiki
-
I wrote a little script located on:
http://www.netztechnik.at/download/sme8/howto/knowledgeTree/inst-kt.sh
I think this is not the best solution, although it allows for a quick and easy installation it also does not show the user what it does or where it might go wrong. I agree with Stefano that a instruction in the wiki is preferable, IMHO even as a step by step instruction.
Please test it on your own risk and feel free to give me feedback to make it better.
I think the permissions for the configuration files and /opt/knowledgeTree/var can be more restrictive as setting them world writeable is never a good thing, I think this:
# change permissions
chown -R www.www /opt/knowledgeTree
chmod 777 /opt/knowledgeTree/config/config.ini
chmod 777 -R /opt/knowledgeTree/var
should also work with 755, perhaps even with 644.
I also wonder why you are creating a separate user for your script with such broad permissions (effectively a user with all privileges on all databases), if you are to do so you might as well use the mysql root account.
Please keep in mind that when scripting things, actions in the script should be controlled very well and permissions should be set to minimum required values IMHO.
That said, I think it is a good thing that someone took the time to work through installing KnowledgeTree and giving back to the community.
-
I think this is not the best solution, although it allows for a quick and easy installation it also does not show the user what it does or where it might go wrong. I agree with Stefano that a instruction in the wiki is preferable, IMHO even as a step by step instruction.
When all problems are solved i will create a step by step instruction for the wiki, the script should just save time.
I think the permissions for the configuration files and /opt/knowledgeTree/var can be more restrictive ...
I have to work them out ... Maybe someone can help me ?
I also wonder why you are creating a separate user for your script with such broad permissions ...
Thats because I dont know the mysql-root password for the setup-wizzard. The user temp should be deleted after the db and dbuser is created as described in the script.
-
Hi,
Ok I think I am ready to start writing the KnowledgeTree-Howto on the Wiki. I tried to login but my username/password is not working, is there a special way/mailaddress to solve that because I am already in the Wiki/Docs Group ?
-
I wrote a draft-howto in raw format and put it to:
http://www.netztechnik.at/download/sme8/howto/knowledgeTree/howto-knowledgeTree.txt
This should work until I am able to login to the sme-wiki.
Best
-
I have to work them out ... Maybe someone can help me ?
I already suggested them to you, normally 755 would do, but perhaps even more restrictive (644) does also work.
Thats because I dont know the mysql-root password for the setup-wizzard.
You don´t need to the password is automatically supplied by some magix on SME Server when logged in as root.
-
I already suggested them to you, normally 755 would do, but perhaps even more restrictive (644) does also work.
Have you red my howto - 26122010 ?
You don´t need to the password is automatically supplied by some magix on SME Server when logged in as root.
Have you tried the Installation Wizzard ?
-
Link has changed to:
http://www.netztechnik.at/download/linux/sme/sme8/howto/knowledgeTree/howto-knowledgeTree.txt