Koozali.org: home of the SME Server

SME8 egroupware 1.8

Offline sti

  • *
  • 29
  • +0/-0
SME8 egroupware 1.8
« on: February 13, 2011, 06:55:32 PM »
There was a long discussion last year about that theme...

I tried that with SME8 beta 6 and egroupware 1.8 without success.

I installed it in /opt/egw/1.8/egroupware via svn as described in these articles.
Now I want to start it in my intranet via an ibay say <egw18>   

like this ->  <mySME8_IP>/egw18/setup
I dont get it working ... 
I don't need domain, groups, security just access to everyone

someone can help ?
best regards khsti

 

Offline mmccarn

  • *
  • 2,628
  • +10/-0
Re: SME8 egroupware 1.8
« Reply #1 on: February 14, 2011, 01:40:34 PM »
I installed egroupware 1.8 over the weekend on a SME8b6 system with no problem.

I did this:
- Create a yum entry for sme7contribs (see http://wiki.contribs.org/SME8.0_Contribs_QA#Setup)
- Install SME Site Maker (note: use "--enablerepo=sme7contribs")
- Create and expose http://mysmeserver/egroupware using smesm.
- Download egroupware and egroupeware-egw pear, and extract both to /opt/egroupware
- chown -R www:www /opt/egroupware
- browse to http://mysmeserver/egroupware, and run through the installation

During the installation, I needed to install some dependencies and change some settings.

Dependencies:
- jpgraph requested by egroupware for Gantt charts (download to /opt/jpgraph, then edit the config to point to the right directories)
- XML_Feed_Parser:
 cd /usr/share/pear
 php -q pearcmd.php install XML_Feed_Parser

Settings:
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
pico -w 99SMESiteMaker_egroupware


- change "open_basedir" to allow access to SME's pear files, /tmp, and "urandom" (used by CRAM-MD5 and DIGEST-MD5 auth)
php_admin_value open_basedir /opt/egroupware:/opt/jpgraph:/usr/share/pear-addons:/usr/share/pear:/tmp:/dev

- Set the timezone and mbstring as desired:
php_admin_value date.timezone America/New_York
php_admin_value mbstring.func_overload 7


I was not able to get mcrypt installed.  I didn't want to follow the method described in the wiki, because it looked (to me) as though it will cause problems if any future SME or Centos update includes any updates to php.

Offline sti

  • *
  • 29
  • +0/-0
Re: SME8 egroupware 1.8
« Reply #2 on: February 22, 2011, 03:45:54 PM »
thanks for help...

I dont get jpgraph installed for egroupware

setupcheck says its not installed. But it is in /opt/jpgraph (ver 3.5)

any idea ?

KH

Offline mmccarn

  • *
  • 2,628
  • +10/-0
Re: SME8 egroupware 1.8
« Reply #3 on: February 23, 2011, 12:37:40 PM »
I did this:
- download the latest version of jpgraph (jpgraph-3.5.0b1.tar.gz)
- extract into a temp location
- move the "src" folder to "/opt/jpgraph": mv jpgraph-3.5.0b1/src /opt/jpgraph
- modify /opt/jpgraph/jpg-config.inc.php - here's a "diff" between the original and my version:
Code: [Select]
@@ -35,9 +35,9 @@
 //   MBTTF_DIR $SERVER_SYSTEMROOT/fonts/
 //
 //------------------------------------------------------------------------
-// define('CACHE_DIR','/tmp/jpgraph_cache/');
-// define('TTF_DIR','/usr/share/fonts/TrueType/');
-// define('MBTTF_DIR','/usr/share/fonts/TrueType/');
+define('CACHE_DIR','/tmp/jpgraph_cache/');
+define('TTF_DIR','/opt/jpgraph/fonts/');
+define('MBTTF_DIR','/opt/jpgraph/fonts/');

 //-------------------------------------------------------------------------
 // Cache directory specification for use with CSIM graphs that are

- change ownership on /opt/jpgraph using chown -R www:www /opt/jpgraph

- add /opt/jpgraph to php_admin_value open_basedir: php_admin_value open_basedir /opt/egroupware:/opt/jpgraph

Offline sti

  • *
  • 29
  • +0/-0
Re: SME8 egroupware 1.8
« Reply #4 on: February 23, 2011, 02:36:53 PM »
- move the "src" folder to "/opt/jpgraph": mv jpgraph-3.5.0b1/src /opt/jpgraph

so it looks like   /opt/jpgraph/src/<srcfiles>

then i dont understand next line
+define('MBTTF_DIR','/opt/jpgraph/fonts/');

it then should be
+define('MBTTF_DIR','/opt/jpgraph/src/fonts/');

KH

Offline mmccarn

  • *
  • 2,628
  • +10/-0
Re: SME8 egroupware 1.8
« Reply #5 on: February 23, 2011, 04:05:12 PM »
I gave the wrong command, then.

The contents of "src" need to end up in /opt/jpgraph.

Perhaps:
mv jpgraph-3.5.0b1/src/* /opt/jpgraph

Offline ReetP

  • *
  • 3,742
  • +5/-0
Re: SME8 egroupware 1.8
« Reply #6 on: March 28, 2011, 11:00:26 PM »
Just seen this thread whilst searching the forums for solutions.

I have 1.8 installed on 8b6 as an upgrade to an existing 1.6 and I think from 1.4 before it. I think that was installed originally with an old sme-egroupware rpm and not sitemaker.

It all upgraded fine except for two things

I have the following error with JPGraph

"Checking for JPGraph in /opt/egroupware/jpgraph: version unknown"

I downloaded and installed 3.0.7 and couldn't see an earlier version. Any ideas ?

I can live without JPGraph but for SYNCML which is seriously important, I'm also stuck on the mbstring.func_overload

For general use it should be set to 7 but it needs an override for rpc.php to 0 which I cannot seem to set.

I have the following in /etc/httpd/conf/httpd.conf

Code: [Select]
#--------------------------------------------------------------
# eGroupWare
#--------------------------------------------------------------
Alias /egroupware /opt/egroupware/html

<Directory /opt/egroupware/html/>
  SSLRequireSSL on
  AddType application/x-httpd-php .php .php3 .phtml
  AddType text/xml .xml
  Options FollowSymLinks ExecCGI
  AllowOverride None
  Order allow,deny
  allow from all
  DirectoryIndex index.html index.php
  AddHandler cgi-script .cgi
  AddDefaultCharset Off
  php_flag file_uploads on
  php_flag log_errors on
  php_flag magic_quotes_gpc off
  php_flag magic_quotes_runtime off
  php_flag register_globals off
  php_flag short_open_tag on
  php_flag track_vars on
  php_flag display_errors off
  php_value error_reporting 'E_ALL & ~E_NOTICE'
  php_value max_execution_time 90
  php_value mbstring.func_overload 7
  php_value memory_limit 24M
  php_value session.gc_maxlifetime 1440
  php_value session.save_path /opt/egroupware/tmp
  php_value include_path .:/usr/share/pear
  php_value open_basedir /opt/egroupware:/tmp
  php_admin_value open_basedir /opt/egroupware:/opt/jpgraph:/usr/share/pear-addons:/usr/share/pear:/tmp:/dev
  php_value upload_max_filesize 10M
  <Files ~ "\.inc\.php$">
    Order allow,deny
    Deny from all
  </Files>
</Directory>

<Location /opt/egroupware/html/rpc.php>
  php_value mbstring.func_overload 0
  Order allow,deny
  allow from all
</Location>

I'm not sure which openbase_dir should be used - 'php_value' or 'php_admin_value' and I'm not sure about the last section - it is meant to be set as mbstring.func_overload = 0 for calls to rpc.php but the logs indicate this is not happening.

I think that this section might be causing part of the problem :

Code: [Select]
  <Files ~ "\.inc\.php$">
    Order allow,deny
    Deny from all
  </Files>

Which I think means that you cannot override the setting. So the question is how do you do it on a per file basis ?

Anyone got any bright ideas as I'm seriously stuck !

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: SME8 egroupware 1.8
« Reply #7 on: March 29, 2011, 07:07:03 PM »
I think that this section might be causing part of the problem :

Code: [Select]
  <Files ~ "\.inc\.php$">
    Order allow,deny
    Deny from all
  </Files>

Which I think means that you cannot override the setting. So the question is how do you do it on a per file basis ?
No, that is a wrong assumption. This part sets the access to files matching the regular expression specified and will first match all Allow rules before trying to match the Deny rules, this fragment should prevent access to files that are ending on .inc.php.

The keyword that is preventing further modification of settings is the AllowOverride option.

For more information on the webserver configuration you can look in the documentation: http://httpd.apache.org/docs/current/mod/quickreference.html

Since SME Server generates it's configuration files from an internal database using a template system, you should not modify the configuration files directly. You should find the configuration file template in /etc/e-smith/templates/ and make a copy in /etc/e-smith/templates-custom/ of it maintaining the directory structure relative to /etc/e-smith/templates/.
You can make modifications to this copied fragment.

More on the template system and the configuration database can be found in the Developers Guide or the Template Tutorial in the wiki.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: SME8 egroupware 1.8
« Reply #8 on: March 29, 2011, 07:13:21 PM »
I'm not sure which openbase_dir should be used - 'php_value' or 'php_admin_value' and I'm not sure about the last section - it is meant to be set as mbstring.func_overload = 0 for calls to rpc.php but the logs indicate this is not happening.
php_admin_value is used for setting configuration directives in the httpd.conf file, which should not be overridden by users in .htaccess files or using the ini_set() function, more information can be found in the php documentation: http://php.net/manual/en/configuration.changes.php
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline ReetP

  • *
  • 3,742
  • +5/-0
Re: SME8 egroupware 1.8
« Reply #9 on: March 29, 2011, 07:41:39 PM »
Thanks for the reply !

No, that is a wrong assumption. This part sets the access to files matching the regular expression specified and will first match all Allow rules before trying to match the Deny rules, this fragment should prevent access to files that are ending on .inc.php.

The keyword that is preventing further modification of settings is the AllowOverride option.

Ah, thanks. httpd configuration is not my strongest suite and I'm wary of buggering this up !

Quote
For more information on the webserver configuration you can look in the documentation: http://httpd.apache.org/docs/current/mod/quickreference.html

Thanks for the link - I am very conscious of the security implications of this and don't want to allow any more access than required.

Quote
Since SME Server generates it's configuration files from an internal database using a template system, you should not modify the configuration files directly. You should find the configuration file template in /etc/e-smith/templates/ and make a copy in /etc/e-smith/templates-custom/ of it maintaining the directory structure relative to /etc/e-smith/templates/.

I am well aware of this and every change I make goes in to the template system. So much easier to back out of things if you go wrong !

I also note your comments in your second reply which you posted whilst I was writing this.

It would appear that I need to :

AllowOverride All

But I think that the Location directive should be changed to

<Files "/opt/egroupware/html/rpc.php">
  php_value mbstring.func_overload 0
  Order allow,deny
  allow from all
</Files>

Is that sufficient ?

Sorry for my caution !

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline mmccarn

  • *
  • 2,628
  • +10/-0
Re: SME8 egroupware 1.8
« Reply #10 on: March 30, 2011, 03:09:50 AM »
Here is the complete content of the template fragment /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/99SMESiteMaker_egroupware on my SME8b6 system (I suspect that my setting for 'open_basedir' is too liberal):
Code: [Select]
Alias /egroupware /opt/egroupware
<Directory /opt/egroupware>
Options  FollowSymLinks
SSLRequireSSL
AddType application/x-httpd-php .php .php3 .phtml
AllowOverride All
order deny,allow
deny from all
allow from all
php_flag allow_url_fopen off
php_admin_flag register_globals off
php_admin_value eaccelerator.enable 1
php_admin_value open_basedir /opt:/usr/share/pear-addons:/usr/share/pear:/tmp:/dev
php_admin_value date.timezone America/New_York
php_admin_value mbstring.func_overload 7
</Directory>

Here is the complete content of the file /opt/jpgraph/jpg-config.inc.php (the only lines I changed are detailed in an earlier post - I needed to specify the location of the folder containing the fonts, and I needed to specify a "tmp" folder where jpgraph had write access):
Code: [Select]
<?php
//=======================================================================
// File:        JPG-CONFIG.INC
// Description: Configuration file for JpGraph library
// Created:     2004-03-27
// Ver:         $Id: jpg-config.inc.php 1871 2009-09-29 05:56:39Z ljp $
//
// Copyright (c) Asial Corporation. All rights reserved.
//========================================================================


//------------------------------------------------------------------------
// Directories for cache and font directory.
//
// CACHE_DIR:
// The full absolute name of the directory to be used to store the
// cached image files. This directory will not be used if the USE_CACHE
// define (further down) is false. If you enable the cache please note that
// this directory MUST be readable and writable for the process running PHP.
// Must end with '/'
//
// TTF_DIR:
// Directory where TTF fonts can be found. Must end with '/'
//
// The default values used if these defines are left commented out are:
//
// UNIX:
//   CACHE_DIR /tmp/jpgraph_cache/
//   TTF_DIR   /usr/share/fonts/truetype/
//   MBTTF_DIR /usr/share/fonts/truetype/
//
// WINDOWS:
//   CACHE_DIR $SERVER_TEMP/jpgraph_cache/
//   TTF_DIR   $SERVER_SYSTEMROOT/fonts/
//   MBTTF_DIR $SERVER_SYSTEMROOT/fonts/
//
//------------------------------------------------------------------------
define('CACHE_DIR','/tmp/jpgraph_cache/');
define('TTF_DIR','/opt/jpgraph/fonts/');
define('MBTTF_DIR','/opt/jpgraph/fonts/');

//-------------------------------------------------------------------------
// Cache directory specification for use with CSIM graphs that are
// using the cache.
// The directory must be the filesysystem name as seen by PHP
// and the 'http' version must be the same directory but as
// seen by the HTTP server relative to the 'htdocs' ddirectory.
// If a relative path is specified it is taken to be relative from where
// the image script is executed.
// Note: The default setting is to create a subdirectory in the
// directory from where the image script is executed and store all files
// there. As ususal this directory must be writeable by the PHP process.
define('CSIMCACHE_DIR','csimcache/');
define('CSIMCACHE_HTTP_DIR','csimcache/');

//------------------------------------------------------------------------
// Various JpGraph Settings. Adjust accordingly to your
// preferences. Note that cache functionality is turned off by
// default (Enable by setting USE_CACHE to true)
//------------------------------------------------------------------------

// Deafult locale for error messages.
// This defaults to English = 'en'
define('DEFAULT_ERR_LOCALE','en');

// Deafult graphic format set to 'auto' which will automatically
// choose the best available format in the order png,gif,jpeg
// (The supported format depends on what your PHP installation supports)
define('DEFAULT_GFORMAT','auto');

// Should the cache be used at all? By setting this to false no
// files will be generated in the cache directory.
// The difference from READ_CACHE being that setting READ_CACHE to
// false will still create the image in the cache directory
// just not use it. By setting USE_CACHE=false no files will even
// be generated in the cache directory.
define('USE_CACHE',false);

// Should we try to find an image in the cache before generating it?
// Set this define to false to bypass the reading of the cache and always
// regenerate the image. Note that even if reading the cache is
// disabled the cached will still be updated with the newly generated
// image. Set also 'USE_CACHE' below.
define('READ_CACHE',true);

// Determine if the error handler should be image based or purely
// text based. Image based makes it easier since the script will
// always return an image even in case of errors.
define('USE_IMAGE_ERROR_HANDLER',true);

// Should the library examine the global php_errmsg string and convert
// any error in it to a graphical representation. This is handy for the
// occasions when, for example, header files cannot be found and this results
// in the graph not being created and just a 'red-cross' image would be seen.
// This should be turned off for a production site.
define('CATCH_PHPERRMSG',true);

// Determine if the library should also setup the default PHP
// error handler to generate a graphic error mesage. This is useful
// during development to be able to see the error message as an image
// instead as a 'red-cross' in a page where an image is expected.
define('INSTALL_PHP_ERR_HANDLER',false);

// Should usage of deprecated functions and parameters give a fatal error?
// (Useful to check if code is future proof.)
define('ERR_DEPRECATED',true);

// The builtin GD function imagettfbbox() fuction which calculates the bounding box for
// text using TTF fonts is buggy. By setting this define to true the library
// uses its own compensation for this bug. However this will give a
// slightly different visual apparance than not using this compensation.
// Enabling this compensation will in general give text a bit more space to more
// truly reflect the actual bounding box which is a bit larger than what the
// GD function thinks.
define('USE_LIBRARY_IMAGETTFBBOX',true);

//------------------------------------------------------------------------
// The following constants should rarely have to be changed !
//------------------------------------------------------------------------

// What group should the cached file belong to
// (Set to '' will give the default group for the 'PHP-user')
// Please note that the Apache user must be a member of the
// specified group since otherwise it is impossible for Apache
// to set the specified group.
define('CACHE_FILE_GROUP','www');

// What permissions should the cached file have
// (Set to '' will give the default persmissions for the 'PHP-user')
define('CACHE_FILE_MOD',0664);

// Default theme class name
define('DEFAULT_THEME_CLASS''UniversalTheme');

define('SUPERSAMPLING'true);
define('SUPERSAMPLING_SCALE'1);

?>

Offline ReetP

  • *
  • 3,742
  • +5/-0
Re: SME8 egroupware 1.8
« Reply #11 on: March 30, 2011, 09:18:37 PM »
Hmm, thanks for that. Fundamentally I don't think my config is so different.

I think the jograph problem is related to the open_basedir that is not allowing jpgraph to be seen as it is on the same level directory as egroupware so things in /opt/egroupware can be seen but they can't see anything in /opt/jpgraph - I'll have a look at that but it is not my biggest concern.

Still don't seem to be able to get the mbstring setting overridden for rpc.php and that is the bit I need to do for SyncML.

Apparently the setting of 7 is required for certain languages. I don't think it would be such a problem in English, but the users of the system are using it in Spanish and I'm worried that certain characters may be a problem.

I think I need to put AllowOveride All in httpd.conf and then set an individual override in the .htaccess file though I would rather do it all in httpd.conf so I can template it and not mess with .htaccess which is just another layer of complxity !

Any further suggestions gratefully received !

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,742
  • +5/-0
Re: SME8 egroupware 1.8
« Reply #12 on: April 27, 2011, 06:36:12 PM »
As a follow up, I changed the Location directive for rpc.php to the following :

<Location /egroupware/rpc.php>

Location is apparently the Path part of the URL.

My full httpd.conf section for egroupware is now as follows :

/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/98egroupware

Code: [Select]
# Apache and PHP configuration for EGroupware
#
# Many settings are required to have a # certain value for eGroupWare
# to function reasonably, so only change something if you are sure.

# this makes EGroupware available for all vhosts
Alias /egroupware /opt/egroupware/html

<Directory /opt/egroupware/html/>
{
    my $egwsec = $egroupware{'HTTPS'} || "off";
    if ($egwsec eq "off")
    {
  $OUT .= "  # SSLRequireSSL on";   
    } else {
  $OUT .= "  SSLRequireSSL on";
    }
}

  AddType application/x-httpd-php .php .php3 .phtml
  AddType text/xml .xml

  Options FollowSymLinks ExecCGI
  AllowOverride None
  Order allow,deny
{
    my $egw = $egroupware{'PublicAccess'} || "local";
    if ($egw eq "local")
    {
  $OUT .= "  allow from $localAccess";   
    } else {
  $OUT .= "  allow from all";
    }
}
  DirectoryIndex index.html index.php
  AddHandler cgi-script .cgi
  AddDefaultCharset Off
  php_flag file_uploads on
  php_flag log_errors on
  php_flag magic_quotes_gpc off
  php_flag magic_quotes_runtime off
  php_flag register_globals off
  php_flag short_open_tag on
  php_flag track_vars on
  php_flag display_errors off
  # E_ALL & ~E_NOTICE & ~E_STRICT = 8191 - 8 - 2048 = 6135
  php_value error_reporting 6135
  php_value max_execution_time 90
  php_admin_value mbstring.func_overload 7
  php_value memory_limit 64M
  php_value session.gc_maxlifetime 14400
  php_value include_path .:/usr/share/pear
  php_admin_value open_basedir /opt/egroupware/html:/opt/egroupware/jpgraph:/opt/egroupware/tmp:/usr/share/pear-addons:/usr/share/pear:/tmp:/usr/bin/tnef:/usr/bin/zip
  php_value upload_max_filesize 10M
  php_admin_value upload_tmp_dir /tmp
  php_value post_max_size 65M
  <Files ~ "\.inc\.php$">
    Order allow,deny
    Deny from all
  </Files>
</Directory>

<Directory /opt/egroupware/html/phpsysinfo/>
    php_admin_value open_basedir /
</Directory>

<Directory /opt/egroupware/html/gallery/>
    php_admin_value open_basedir /opt/egroupware/html:/tmp:/usr/share/pear:/usr/bin:/bin
</Directory>

<Location /egroupware/rpc.php>
    php_admin_value mbstring.func_overload 0
    Order allow,deny
    Allow from all
</Location>


/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/60redir-egroupware

Code: [Select]
{
    if ($port eq "80")
    {
        my $egwsec = $egroupware{'HTTPS'} || "off";
        if ($egwsec eq "off")
       { $OUT = '    #'; }
        else
             { $OUT = '    RewriteRule ^/egroupware(/.*|$)    https://%{HTTP_HOST}/egroupware$1 [L,R]'; }
    }
    else
    { $OUT = '    #'; }
}

HTH
B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation