Author Topic: Upgrading from 1.7.5 to 2.0.0.8 (stable version)  (Read 21951 times)

aphex999

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« on: March 28, 2012, 07:03:24 am »
Hi *,

first of all, thanks a lot for your work!

.. and now the problem: I'm trying to upgrade the FengOffice from 1.7.5 to 2.0.0.8 (stable), without success.

My environment:

OS: Debian Squeeze
Kernel: 2.6.32
PHP: 5.3.3
Apache2: 2.2.16
MySQL: 5.1.49

After clicking on the Upgrade button, I receive the following error:

Code: [Select]
Failed to execute DB schema transformations. MySQL said: Table 'fo_administration_tools' already exists

When I drop the table 'fo_administration_tools', then I receive the same error with table name 'fo_application_logs', then 'fo_comments', then 'fo_companies' ... and here I stopped dropping the tables.


I hope to get a solution soon... thanks in advance!

Aron

mirsch

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« Reply #1 on: March 28, 2012, 10:25:48 am »
Hi,

I've the same problem except after dropping 'fo_administration_tools' I get error:

Code: [Select]
Failed to execute DB schema transformations. MySQL said: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE

mirsch

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« Reply #2 on: March 29, 2012, 04:36:34 am »
ok first error resolved - if old database tables have prefix go_ it works, because the upgrade script will create new ones with prefix fo_

i've resolved the second error by removing "USING BTREE" from public/install/installation/templates/sql/mysql_schema.php

jakobd

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« Reply #3 on: April 01, 2012, 09:54:14 am »
Yesterday I did the exact same exercise by manual update.
I found the mysql_schema.php file to not work as is. Please find attached my corrected version. The problem was related to "USING BTREE" statements.

Good thing I did a database backup before upgrading ;-)

After doing the manual install -- accessing the website yielded no content at all. It is vital to execute the object permission migration also:

  [FENGOFFICE_BASEURL]/public/upgrade/complete_migration.php

Nice and handy product!

Just miss being able to make email composition default to text...

neopartizan

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« Reply #4 on: April 02, 2012, 08:28:01 am »
WORKS FOR ME! THANKS A LOT!

winhex

  • Freshman
  • *
  • Posts: 12
    • View Profile
Re: Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« Reply #5 on: April 04, 2012, 04:22:35 am »
Hi, I'd like to upgrade Fengoffice, but after upgrade script finished I have next error:

Code: [Select]
Session "default" started at 2012-04-04T07:20:41+0000
#1 DEBUG: SQL ERROR: Query failed with message 'Table 'my_db_1.og_plugins' doesn't exist' - SELECT * FROM `og_plugins` WHERE  is_installed = 1 AND is_act$
#2 FATAL: exception 'DBQueryError' with message 'Query failed with message 'Table 'my_db_1.og_plugins' doesn't exist'' in /var/www/environment/library/da$
    Stack trace:
    #0 /var/www/environment/library/database/adapters/AbstractDBAdapter.class.php(304): AbstractDBAdapter->prepareAndExecute('SELECT * FROM `...', NULL)
    #1 /var/www/environment/library/database/DB.class.php(213): AbstractDBAdapter->executeAll('SELECT * FROM `...', NULL)
    #2 /var/www/environment/classes/dataaccess/DataManager.class.php(277): DB::executeAll('SELECT * FROM `...')
    #3 /var/www/application/models/plugins/base/BasePlugins.class.php(111): DataManager->find(Array)
    #4 /var/www/environment/classes/dataaccess/DataManager.class.php(315): BasePlugins->find(Array)
    #5 /var/www/application/models/plugins/base/BasePlugins.class.php(126): DataManager->findAll(Array)
    #6 /var/www/application/models/plugins/Plugins.class.php(39): BasePlugins->findAll(Array)
    #7 /var/www/environment/classes/hook/Hook.class.php(30): Plugins->getActive()
    #8 /var/www/application/application.php(16): Hook::init()
    #9 /var/www/init.php(151): require_once('/var/www/applic...')
    #10 /var/www/index.php(9): require('/var/www/init.p...')
    #11 {main}
Time since start: 0.0018711090087891 seconds

How to fix it?  ???
« Last Edit: April 04, 2012, 04:24:09 am by winhex »

aphex999

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« Reply #6 on: April 04, 2012, 09:25:03 am »
Hi Mates!

Thanks for the hints, im going to try them too, and post my experiences...

Have a nice day!


marc

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« Reply #7 on: April 15, 2012, 11:05:06 am »
Hi

so i have the same problem...

Config file found and loaded.
File '/config/config.php' exists and is writable
Folder '/config' exists and is writable
Folder '/cache' exists and is writable
Folder '/tmp' exists and is writable
Folder '/upload' exists and is writable
Extension 'mysql' is loaded
Extension 'gd' is loaded
Extension 'simplexml' is loaded
Upgrade script has connected to the database.
Test query has been executed. Its safe to proceed with database migration.
Failed to execute DB schema transformations. MySQL said: Table 'fo_administration_tools' already exists
Error upgrading to version 2.0.0.8

And i have Change the TABLE_PREFIX at the config/config.php from og_ to fo_

but i get allways this Error .... PLEASE HELP ME :-)

marc

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« Reply #8 on: April 20, 2012, 07:31:08 am »
Help!!! :'(

aphex999

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« Reply #9 on: May 03, 2012, 04:58:09 am »
Hi guys,


thanks for your ideas! I also succeded to migrate from 1.7.5 to 2.0.0.8.

Here's the process:


Code: [Select]
1. dump db to fengoffice.sql

2. to change "fo_" prefix to "og_" generate the sql commands needed:

grep TABLE fengoffice.sql | cut -d"\`" -f2 | cut -d"_" -f2- > tables && for t in `cat tables` ; do echo 'RENAME TABLE `fengoffice2`.`fo_'$t'` TO `fengoffice2`.`go_'$t'`;'; done

3. create new db "fengoffice2", set all priv for user "fengoffice2", etc...

4. import the tables from dump

5. run the generated sql commands to change the prefix

6. extract the "fengoffice_2.0.0.zip" to your webserver (for example to "/var/www/fengoffice2")

7. chown to root:www-data, and chmod the config dir to 775

8. copy the config/config.php from your working 1.7.5 install to the new config directory, and update settings

9. navigate your browser to ".../fengoffice2/public/upgrade"

10. set old version to 1.7.4 and run the update

11. run ".../fengoffice2/public/upgrade/complete_migration.php" to set permissions



Good luck!

-marco-

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« Reply #10 on: May 04, 2012, 10:49:10 pm »
Hi

 I'm trying to manual upgrade the FengOffice from 1.7.5 to 2.0.0.8 (stable), with a problem:

You already have upgraded to the latest possible version.

    Config file found and loaded.
    File '/config/config.php' exists and is writable
    Folder '/config' exists and is writable
    Folder '/cache' exists and is writable
    Folder '/tmp' exists and is writable
    Folder '/upload' exists and is writable
    Extension 'mysql' is loaded
    Extension 'gd' is loaded
    Extension 'simplexml' is loaded
    Upgrade script has connected to the database.
    Test query has been executed. Its safe to proceed with database migration.
    Database schema transformations executed (total queries: 319)

    Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/m/public_html/office/public/upgrade/library/functions.php on line 192
    Finished generating Object Members
    Feng Office has been upgraded. You are now running Feng Office 2.0.0.8 Enjoy!

When I try to login to index.php?c=access&a=login it appears a white screen

Thank you for your help. ;)

-marco-

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« Reply #11 on: May 05, 2012, 05:06:54 am »
a little update, because I don't understand how I can resolve this problem.

Thank you

-marco-

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« Reply #12 on: May 05, 2012, 09:02:19 am »
sorry for double post, but I'm desperate

I have find a message from hubschraubaer

Quote


View Profile Personal Message (Offline)    
   
Re: Error in 1.7.5 to 2.0 upgrade - (SOLVED!)
« Reply #32 on: April 22, 2012, 10:13:43 AM »    Reply with quote
Dear all,

finally I got 2.0 running. What I've missed in the upgrade steps was to clean out all application directories of the old installation. I just copied the new files over to my FO root folder, overwriting all existing files. But that leaves several application folders and files from the old version in place, which seems to cause troubles with the DB upgrade and the migration of the objects.

The solution for my problems:

1. deleted all application folders in my FengOffice root directory except :
/cache/
/config/
/tmp/
/upload/
to leave just the config, logs and uploaded files in place

2. copied the following application folders (fresh from the unzipped fengoffice_2.0.0.zip) into the FO root directory:
/application/
/environment/
/hooks/
/language/
/library/
/plugins/
/public/

2. deleted autoloader.php in cache/

3. opened public/upgrade/complete_migration.php again in the browser

Now everything seems fully functional within FO and the counts of fo_processed_objects and fo_objects are the same.

I don't know if this problems is specific to my installation, but obviously some files and folders of the older versions collide with FO 2.0. As an example: in ./application/models/ I found the folders /timeslot/ (from the old version) and /timeslots/ (from the 2.0 version).

If it is necessary to delete old application files prior to upgrading the installation, I kindly suggest to advise this clearly in the documentation. Otherwise it is common practise for most admins to only overwrite updated files during an upgrade.


Kind regards,
Dirk

but now I have these errors:

Warning: include(init.php) [function.include]: failed to open stream: No such file or directory in /home/m/public_html/office/public/upgrade/complete_migration.php on line 5

Warning: include(init.php) [function.include]: failed to open stream: No such file or directory in /home/m/public_html/office/public/upgrade/complete_migration.php on line 5

Warning: include() [function.include]: Failed opening 'init.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/m/public_html/office/public/upgrade/complete_migration.php on line 5

Fatal error: Class 'Env' not found in /home/m/public_html/office/public/upgrade/complete_migration.php on line 7

someone can help me please?

thank you
« Last Edit: May 05, 2012, 09:07:03 am by -marco- »

editfish

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« Reply #13 on: May 12, 2012, 11:41:27 am »
This seems like a ridiculous amount of work to update to the new stable version... :/


ritmo

  • Freshman
  • *
  • Posts: 10
    • View Profile
Re: Upgrading from 1.7.5 to 2.0.0.8 (stable version)
« Reply #14 on: May 14, 2012, 10:54:11 am »
This seems like a ridiculous amount of work to update to the new stable version... :/



No kidding!

We could all do with a bit more information regarding the proposed timeline for the next release, and hopefully this would include a proper migration script.

David