This manual is deprecated. Please visit https://groupoffice.readthedocs.io for the latest documentation.

Difference between revisions of "Troubleshooting"

From Group-Office Groupware and CRM Documentation
Jump to: navigation, search
(Problems with synchronization)
(Problems with creating files or folder)
Line 90: Line 90:
  
 
Enter:<br />
 
Enter:<br />
<Directory /home/httpd/vhosts/domain.com/httpdocs><br />
+
<Directory /var/www/vhosts/domain.com/httpdocs><br />
 +
php_admin_flag safe_mode off<br />
 
php_admin_value open_basedir none<br />
 
php_admin_value open_basedir none<br />
</Directory>
+
php_admin_flag magic_quotes_gpc off<br />
 +
php_admin_flag log_errors on<br />
 +
php_admin_flag display_erors off<br />
 +
</Directory><br />
  
 
Reload the conf into httpd.include:
 
Reload the conf into httpd.include:
Line 103: Line 107:
  
 
Now it should be disabled
 
Now it should be disabled
 
 
  
 
==Restoring lost data from a MySQL backup==
 
==Restoring lost data from a MySQL backup==

Revision as of 10:02, 24 December 2008

General instructions

  1. Make sure error logging is enabled in php.ini (add log_errors=on to /etc/../php.ini)
  2. Make sure Group-Office logging is enabled in config.php ( set $config['log']=true;)
  3. Check the Apache error logs. They are the most important for problem solving!
  4. Search this site
  5. Search the forums
  6. If you have a support contact send a good description of the problem and relevant error messages to Intermesh.


Problems with synchronization

If you have problems with synchronizing Group-Office then please take following steps first before contacting Intermesh:

  1. Double check the setup and read the instructions
  2. Make sure error logging is enabled in php.ini
  3. Make sure Group-Office logging is enabled in config.php ( set $config['log']=true;)
  4. Check the logs they are very important. There should be a Group-Office log file in $config['file_storage_path'] /log/sync/ as well. If it's not there you probably have a file permission problem. Group-Office tries to move the log file from the temporary directory to a user log file directory. It could be that this process fails and sync fails as well.
  5. Check if the solution is on this page
  6. Try performing a 'Slow sync'. With a slow sync all data gets send to Group-Office and Group-Office sends back all missing data.
  7. Try performing a sync in mode: 'Replace all local data' (Name might differ per device). The device will delete all local calendar and contact data and Group-Office will send all data to the client. Of course only do this when the Group-Office data is leading.
  8. Search the forums
  9. Send to Intermesh: Apache error log, Group-Office error log, Client error log and a description of what happens exactly. Without the logs we can't do anything!


Common errors

"No SyncML response" or "Server Failure: server returned error code -1" or "Invalid hostaddress"
The server probably didn't reply because an error occurred. Check the apache error log for errors. Also with the Synthesis client check if you have set the Server Version to SyncML 1.1 and not 1.2. You can find that setting at Extras->Settings->Options

Not found (404)
You probably setup an invalid remote database for contacts, calendar or todo's. Please check the installation instructions for the correct values (vcal, vcaltodo, vtodo, vcard etc...)

PHP Fatal error: Call to a member function children() on a non-object in ...
If you have the Synthesis client please check if the server version is set to SyncML 1.1

wbxml to xml or vice versa conversion failed
Check if $config['cmd_wbxml2xml'] and $config['cmd_xml2wbxml'] are set and check if these commands are actually executable by apache.

wbxml2xml failed: Unknown Public ID
[Group-Office][20070619 16:24][notloggedin]: Fatal error: wbxml2xml conversion failed
[Group-Office][20070619 16:24][notloggedin]: XML error: no element found at line 1
Check if you have libwbxml2 version 0.9.2 or higher installed. Any earlier version will fail.

Or you have set the client to use SyncML version 1.2. In that case change it to 1.1

wbxml2xml failed: Unexpected End Of WBXML Buffer
[Group-Office][20070619 18:22][notloggedin]: Fatal error: wbxml2xml conversion failed
[Group-Office][20070619 18:22][notloggedin]: XML error: no element found at line 1
Check if you have libwbxml2 version 0.9.2 or higher installed. Any earlier version will fail.

Problems with creating files or folder

If you are having errors like these:

Warning: mkdir() [function.mkdir]: Permission denied
Failed to create folder(s): Array(..,..,)

Then you have to take the following steps:

  1. Check the filesystem permissions of the paths mentioned in the error
  2. Check if safe_mode is enabled and denies you access
  3. Check if open_basedir is set and denies you access
  4. Check if SELinux is enabled and you need to setup a policy

The bottom line is that the Apache user (Usually apache or www-data) needs write permissions on the following folders defined in config.php:

$config['file_storage_path']
$config['local_path']
$config['tmpdir']

You can put the folowing script in the directory where Group-Office.php is to do a quick test:

<?php
require('Group-Office.php');

echo 'Using create mode: '.$GO_CONFIG->create_mode;

mkdir_recursive($GO_CONFIG->file_storage_path.'test');
mkdir_recursive($GO_CONFIG->local_path.'test');
mkdir_recursive($GO_CONFIG->tmpdir.'test');


Disable open_basedir in Plesk

Login as root:
vi /home/httpd/vhosts/domain.com/conf/vhost.conf


Enter:
<Directory /var/www/vhosts/domain.com/httpdocs>
php_admin_flag safe_mode off
php_admin_value open_basedir none
php_admin_flag magic_quotes_gpc off
php_admin_flag log_errors on
php_admin_flag display_erors off
</Directory>

Reload the conf into httpd.include:

PLESK 5/6
/usr/local/psa/admin/bin/my_apci_rst

PLESK 7
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

Now it should be disabled

Restoring lost data from a MySQL backup

To restore a backup load the backup database into a seperate database and use PhpMyAdmin to export the right data easily. We will show you an example of how to restore a single calendar. This way of restoring will leave all existing appointments intact but it will restore lost appointments. Login to PhpMyadmin and select the backup database. Browse the cal_calendars table and find out the "id" of the calendar you want to store.

Now delete all calendar data that does not belong to that calendar (replace <calendar_id> with your calendar ID):

DELETE FROM cal_calendars WHERE id !=<calendar_id>;
DELETE FROM cal_events_calendars WHERE calendar_id !=<calendar_id>;
DELETE FROM cal_events WHERE id NOT IN (
SELECT event_id
FROM cal_events_calendars
);
DELETE FROM cal_exceptions WHERE event_id NOT IN (
SELECT event_id
FROM cal_events_calendars
);DELETE FROM cal_participants WHERE event_id NOT IN (
SELECT event_id
FROM cal_events_calendars
);
DELETE FROM cal_reminders WHERE event_id NOT IN (
SELECT event_id
FROM cal_events_calendars
);

Note: The sub selects in the delete statements only work in MySQL 5.0 or newer. If you have an earlier version you need to perform the select statement manualy and create a comma seperate list of it. You can replace the sub select with that list.

Now we have our data prepared. We need to export the right tables using INSERT IGNORE commands. This will insert only non-existent records.

In PhpMyAdmin click at the Database name at the left frame so that you view all tables in the main screen. Now click at "Export". Select the tables:

  1. cal_events
  2. cal_events_calendars
  3. cal_calendars
  4. cal_participants
  5. cal_reminders
  6. acl
  7. acl_items


Uncheck the Structure box
Select "IGNORE INSERTS" and "COMPLETE INSERTS"
Select export type "INSERT"
Save the file and load it into your main database make a backup of your database before you do this in case something goes wrong.