phpgroupware-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [phpGroupWare-users] Failure to instal language (even 1st one)


From: Dave Hall
Subject: Re: [phpGroupWare-users] Failure to instal language (even 1st one)
Date: Wed, 18 Oct 2006 23:48:46 +1000

Hi Chris,

On Wed, 2006-10-18 at 14:12 +0100, Chris Hogan wrote:
> I am trying to set up a new install of 0.9.16.11 on a new hosting
> service, as my current host (where I have an older version of phpGw)
> have smaller PHP memory limit & some stuff won't run. 
> 

As part of the 0.9.18 release we are trying to reduce the memory
footprint of phpgw, but unfortunately it looks like we won't be able to
cut much back without removing functionality :(

> I copied all the files, created an empty MySQL database. Installation
> went OK until it asked my to install a language - this shows just
> Breton, then Breton & Catalan, then a list or 8 or 10 languages (each
> time you re-enter the option, very odd), but the problem is the table
> phpgw_lang does not exist. 

This has now been fixed in stable cvs.  It had been fixed in the
development branch for some time.  Tonight I quickly backported the fix
for you.

Please update from cvs to grab the fix.

> I tried using phpmyadmin to clone the table from my old installation &
> got 
> 
> #1071 - Specified key was too long; max key length is 1000 bytes
> 
> The database is MYSQL 4.1.21, the PHP is 5.1.4, but I put the
> ini_set('zend.ze1_compatibility_mode', true); in the header.inc
> 
> Completely stuck here and this demo was to show a potential user (a
> group of schools in the south west of England).
> 
> Any pointers would be appreciated.

This bug has also been fixed in the development branch.  Backporting
this fix into stable CVS is not an option as it involves a database
schema change.

I can offer you 2 options to work around it.

Using phpmyadmin (tested on current stable 2.9.0.2) do the following

Go into datbases
Tick your phpGroupWare db (named phpgroupware?)
Click the drop button at the bottom of the list (the red X icon)
Click Yes to confirm when prompted
At the bottom of the page enter the name of your phpGroupWare db
>From the Collation drop down select latin1_bin (scroll a bit to get it)
Click create
Try again to install phpGroupWare

The other option is to edit the phpgwpai/setup/tables_current.inc.php
file, find the phpgw_lang table definition at around line 153 and make
it read

'phpgw_lang' => array(
        'fd' => array(
                'message_id' => array('type' => 'varchar','precision' => 
'255','nullable' => False,'default' => ''),
                'app_name' => array('type' => 'varchar','precision' => 
'25','nullable' => False,'default' => 'common'),
                'lang' => array('type' => 'varchar','precision' => 
'5','nullable' => False,'default' => ''),
                'content' => array('type' => 'text')
        ),
        'pk' => array('message_id','app_name','lang'),
        'fk' => array(),
        'ix' => array(),
        'uc' => array()
),

This is what has been done in the development branch.  It also requires
you to restart the install process again, so drop the old database and
recreate it - don't worry about the charset this time.

<geeky-explanation>
The problem is caused by mysql reserving 3 bytes for each unicode
character, although using the latin alphabet you are unlikely to use
more than 1 byte per character.  As a primary key is limited to 1000
bytes we are limited to a string length no greater than 333 characters.
</geeky-explanation>

Good luck with the demo.

Cheers

Dave
-- 
Dave Hall (aka skwashd)
API Coordinator
phpGroupWare
e address@hidden
w phpgroupware.org
j address@hidden
sip address@hidden
       _            ____                    __        __             
 _ __ | |__  _ __  / ___|_ __ ___  _   _ _ _\ \      / /_ _ _ __ ___ 
| '_ \| '_ \| '_ \| |  _| '__/ _ \| | | | '_ \ \ /\ / / _` | '__/ _ \
| |_) | | | | |_) | |_| | | | (_) | |_| | |_) \ V  V / (_| | | |  __/
| .__/|_| |_| .__/ \____|_|  \___/ \__,_| .__/ \_/\_/ \__,_|_|  \___|
|_|         |_|                         |_|Web based collaboration platform






reply via email to

[Prev in Thread] Current Thread [Next in Thread]