Upgrade from 2.4.4.to 2.6.2
Hi
is there a way to upgrade from 2.4.4 to 2.6.2 with the data stored in the database for 2.4.4.
Is it possible that you can describe the way how it should be done?
Thanks
dirk
It *is* possible, but might be tricky.
I will write up a tutorial on the upgrade process sometime in the next week or two, but at a high-level, this is what you need to do.
We have not tested a direct migration from 2.4.x to 2.6.x, so I would recommend that you do it in two steps: upgrade 2.4.x to 2.5.x and then upgrade 2.5.x again to 2.6.x.
0) Most importantly, make a complete backup of your system and attempt the upgrade process on the backup before trying it in production!
1) Halt apache (on Linux, typically it's `apache2ctl stop`)
2) Download release 2.5.6 (you'll need to get a copy from the repository using a Subversion client, e.g. `svn co http://svn.openfisma.org/tags/2.5.6/`)
3) Copy your app.conf (application/config/app.conf) from the 2.4.4 installation to the 2.5.6 installation
3) Go into the scripts/bin directory of the 2.5.6 installation and run the following: `doctrine-cli.php migrate`
4) Download 2.6.3
5) Copy your app.conf from 2.5.6 into 2.6.3
6) Copy your data/ directory from the 2.4.4 installation to the 2.6.3 installation
7) Double check that file permissions on the new installation are correct. When in doubt, if this is not a shared server, you can do the following, assuming OpenFISMA is installed in /var/www/openfisma: `find /var/www/openfisma -type f -exec chmod 666 {} \; && find /var/www/openfisma -type d -exec chmod 777 {} \;`
If you receive any error messages during this process, please copy/paste them onto the forum and we'll try to resolve them.
Try running generate-models-yaml before migrate.
Josh Boyd
Endeavor Systems, Inc.
Software Engineer
Hi,
Thanks, the problem yesterday i get solved.
now i get the following errors if i try to migrate:
deesn137:/srv/www/htdocs/openfisma256/scripts/bin # ./doctrine-cli.php migrate
2 error(s) encountered during migration
=======================================
Error #1 - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'p.orgspecific' in 'field list'
#0 /srv/www/htdocs/openfisma256/library/Doctrine/Connection/Statement.php(253): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Statement))
#1 /srv/www/htdocs/openfisma256/library/Doctrine/Connection.php(1013): Doctrine_Connection_Statement->execute(Array)
#2 /srv/www/htdocs/openfisma256/library/Doctrine/Query/Abstract.php(1090): Doctrine_Connection->execute('SELECT p.id AS ...', Array)
#3 /srv/www/htdocs/openfisma256/library/Doctrine/Query/Abstract.php(1138): Doctrine_Query_Abstract->_execute(Array)
#4 /srv/www/htdocs/openfisma256/library/Doctrine/Query.php(2060): Doctrine_Query_Abstract->execute(Array, NULL)
#5 /srv/www/htdocs/openfisma256/library/Doctrine/Table.php(1396): Doctrine_Query->query('FROM Privilege ...', Array, NULL)
#6 /srv/www/htdocs/openfisma256/application/doctrine/migrations/1264541283_version22.php(43): Doctrine_Table->findByDql('resource = ? an...', Array)
#7 /srv/www/htdocs/openfisma256/library/Doctrine/Migration.php(469): Version22->up()
#8 /srv/www/htdocs/openfisma256/library/Doctrine/Migration.php(441): Doctrine_Migration->_doMigrateStep('up', 22)
#9 /srv/www/htdocs/openfisma256/library/Doctrine/Migration.php(300): Doctrine_Migration->_doMigrate(31)
#10 /srv/www/htdocs/openfisma256/library/Doctrine.php(881): Doctrine_Migration->migrate(NULL)
#11 /srv/www/htdocs/openfisma256/library/Doctrine/Task/Migrate.php(41): Doctrine::migrate('/srv/www/htdocs...', NULL)
#12 /srv/www/htdocs/openfisma256/library/Doctrine/Cli.php(152): Doctrine_Task_Migrate->execute()
#13 /srv/www/htdocs/openfisma256/library/Doctrine/Cli.php(91): Doctrine_Cli->_run(Array)
#14 /srv/www/htdocs/openfisma256/scripts/bin/doctrine-cli.php(42): Doctrine_Cli->run(Array)
#15 {main}
Error #2 - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'orgspecific' in 'field list'
#0 /srv/www/htdocs/openfisma256/library/Doctrine/Connection/Statement.php(253): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Statement))
#1 /srv/www/htdocs/openfisma256/library/Doctrine/Connection.php(1049): Doctrine_Connection_Statement->execute(Array)
#2 /srv/www/htdocs/openfisma256/library/Doctrine/Connection.php(693): Doctrine_Connection->exec('INSERT INTO pri...', Array)
#3 /srv/www/htdocs/openfisma256/library/Doctrine/Connection/UnitOfWork.php(582): Doctrine_Connection->insert(Object(Doctrine_Table), Array)
#4 /srv/www/htdocs/openfisma256/library/Doctrine/Connection/UnitOfWork.php(542): Doctrine_Connection_UnitOfWork->processSingleInsert(Object(Privilege))
#5 /srv/www/htdocs/openfisma256/library/Doctrine/Connection/UnitOfWork.php(77): Doctrine_Connection_UnitOfWork->insert(Object(Privilege))
#6 /srv/www/htdocs/openfisma256/library/Doctrine/Record.php(1582): Doctrine_Connection_UnitOfWork->saveGraph(Object(Privilege))
#7 /srv/www/htdocs/openfisma256/library/Doctrine/Collection.php(843): Doctrine_Record->save(Object(Doctrine_Connection_Mysql))
#8 /srv/www/htdocs/openfisma256/library/Doctrine/Connection/UnitOfWork.php(422): Doctrine_Collection->save(Object(Doctrine_Connection_Mysql), false)
#9 /srv/www/htdocs/openfisma256/library/Doctrine/Connection/UnitOfWork.php(128): Doctrine_Connection_UnitOfWork->saveAssociations(Object(Role))
#10 /srv/www/htdocs/openfisma256/library/Doctrine/Record.php(1582): Doctrine_Connection_UnitOfWork->saveGraph(Object(Role))
#11 /srv/www/htdocs/openfisma256/library/Doctrine/Collection.php(843): Doctrine_Record->save(Object(Doctrine_Connection_Mysql))
#12 /srv/www/htdocs/openfisma256/application/doctrine/migrations/1268179656_version29.php(70): Doctrine_Collection->save()
#13 /srv/www/htdocs/openfisma256/library/Doctrine/Migration.php(469): Version29->up()
#14 /srv/www/htdocs/openfisma256/library/Doctrine/Migration.php(441): Doctrine_Migration->_doMigrateStep('up', 29)
#15 /srv/www/htdocs/openfisma256/library/Doctrine/Migration.php(300): Doctrine_Migration->_doMigrate(31)
#16 /srv/www/htdocs/openfisma256/library/Doctrine.php(881): Doctrine_Migration->migrate(NULL)
#17 /srv/www/htdocs/openfisma256/library/Doctrine/Task/Migrate.php(41): Doctrine::migrate('/srv/www/htdocs...', NULL)
#18 /srv/www/htdocs/openfisma256/library/Doctrine/Cli.php(152): Doctrine_Task_Migrate->execute()
#19 /srv/www/htdocs/openfisma256/library/Doctrine/Cli.php(91): Doctrine_Cli->_run(Array)
#20 /srv/www/htdocs/openfisma256/scripts/bin/doctrine-cli.php(42): Doctrine_Cli->run(Array)
#21 {main}
#0 /srv/www/htdocs/openfisma256/library/Doctrine/Migration.php(311): Doctrine_Migration->_throwErrorsException()
#1 /srv/www/htdocs/openfisma256/library/Doctrine.php(881): Doctrine_Migration->migrate(NULL)
#2 /srv/www/htdocs/openfisma256/library/Doctrine/Task/Migrate.php(41): Doctrine::migrate('/srv/www/htdocs...', NULL)
#3 /srv/www/htdocs/openfisma256/library/Doctrine/Cli.php(152): Doctrine_Task_Migrate->execute()
#4 /srv/www/htdocs/openfisma256/library/Doctrine/Cli.php(91): Doctrine_Cli->_run(Array)
#5 /srv/www/htdocs/openfisma256/scripts/bin/doctrine-cli.php(42): Doctrine_Cli->run(Array)
#6 {main}
Elapsed time: 31 seconds
}
I can login to the application, but after login, there is another error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'u.oldfailurecount' in 'field list'
Stack Trace:
#0 /srv/www/htdocs/openfisma256/library/Doctrine/Connection/Statement.php(253): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Statement))
#1 /srv/www/htdocs/openfisma256/library/Doctrine/Connection.php(1013): Doctrine_Connection_Statement->execute(Array)
#2 /srv/www/htdocs/openfisma256/library/Doctrine/Query/Abstract.php(1090): Doctrine_Connection->execute('SELECT u.id AS ...', Array)
#3 /srv/www/htdocs/openfisma256/library/Doctrine/Query/Abstract.php(1138): Doctrine_Query_Abstract->_execute(Array)
#4 /srv/www/htdocs/openfisma256/library/Doctrine/Query.php(274): Doctrine_Query_Abstract->execute(Array, NULL)
#5 /srv/www/htdocs/openfisma256/library/Doctrine/Table.php(1427): Doctrine_Query->fetchOne(Array, NULL)
#6 /srv/www/htdocs/openfisma256/library/Doctrine/Table.php(2390): Doctrine_Table->findOneBy('username', 'root', NULL)
#7 [internal function]: Doctrine_Table->__call('findOneByUserna...', Array)
#8 /srv/www/htdocs/openfisma256/application/controllers/AuthController.php(65): Doctrine_Table->findOneByUsername('root')
#9 /srv/www/htdocs/openfisma256/library/Zend/Controller/Action.php(494): AuthController->loginAction()
#10 /srv/www/htdocs/openfisma256/library/Zend/Controller/Dispatcher/Standard.php(285): Zend_Controller_Action->dispatch('loginAction')
#11 /srv/www/htdocs/openfisma256/library/Zend/Controller/Front.php(934): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#12 /srv/www/htdocs/openfisma256/library/Fisma.php(315): Zend_Controller_Front->dispatch()
#13 /srv/www/htdocs/openfisma256/public/index.php(31): Fisma::dispatch()
#14 {main
Regards
Dirk
Sounds like you are close. The error message that you get at login is related to the fact that the OpenFISMA code is trying to use database fields which don't exist -- this indicates a mismatch between the OpenFISMA version number and the database version number.
Are you using the latest release of OpenFISMA? (It is now 2.6.5)
If you upgrade your environment to this latest version then I think that will fix it.
Hi,
I try to make an upgrade as described above.
And at step 3 i got this error messages.
At the moment i use openfisma 244
1)I upgrade to 249 (Without update of the database)
2) than i upgrade to 256 as described and then i got this error messages.
Because of the error messages i stopped the upgrade
Do you think the error is in step1 when i upgrade to 249?
Regards
Dirk
The 2.4.9 upgrade is probably the culprit. You should update your database at 2.4.9, then move to 2.5.6, update database again (doctrine-cli.php migrate), then move to 2.6.5 and update database one last time.
Hi,
i upgrade from Version 2.4.4 to Version 2.4.9, everything is working fine
From Version 2.4.9 to 2.4.10 , everythink ok
from Version 2.4.10 to 2.4.11. is although ok
when i upgrade from 2.4.11 to 2.5.0 i got the error message as described above.
Regards
Dirk
Try running `doctrine-cli.php generate-models-yaml` before you run the migration for 2.5.0
Hi,
Thanks for your help.
Now i can upgrade and it is possible to login (Version 2.6.5)
unfortunately i can't get the account list. The error message is: data error
when i run doctrine-cli.php migrate there are the following errors:
./doctrine-cli.php migrate
5 error(s) encountered during migration
=======================================
Error #1 - SQLSTATE[HY000]: General error: 1025 Error on rename of './openfisma265/#sql-111d_d3' to './openfisma265/user_role' (errno: 150)
#0 /srv/www/htdocs/openfisma265/library/Doctrine/Connection.php(1068): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Mysql))
#1 /srv/www/htdocs/openfisma265/library/Doctrine/Export/Mysql.php(54): Doctrine_Connection->exec('ALTER TABLE use...')
#2 /srv/www/htdocs/openfisma265/library/Doctrine/Migration/Process.php(183): Doctrine_Export_Mysql->dropConstraint('user_role', NULL, true)
#3 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(492): Doctrine_Migration_Process->processDroppedConstraint(Array)
#4 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(452): Doctrine_Migration->_doMigrateStep('up', 33)
#5 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(301): Doctrine_Migration->_doMigrate(53)
#6 /srv/www/htdocs/openfisma265/library/Doctrine.php(885): Doctrine_Migration->migrate(NULL)
#7 /srv/www/htdocs/openfisma265/library/Doctrine/Task/Migrate.php(41): Doctrine::migrate('/srv/www/htdocs...', NULL)
#8 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(152): Doctrine_Task_Migrate->execute()
#9 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(92): Doctrine_Cli->_run(Array)
#10 /srv/www/htdocs/openfisma265/scripts/bin/doctrine-cli.php(129): Doctrine_Cli->run(Array)
#11 {main}
Error #2 - SQLSTATE[42000]: Syntax error or access violation: 1068 Multiple primary key defined
#0 /srv/www/htdocs/openfisma265/library/Doctrine/Connection.php(1068): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Mysql))
#1 /srv/www/htdocs/openfisma265/library/Doctrine/Export.php(378): Doctrine_Connection->exec('ALTER TABLE use...')
#2 /srv/www/htdocs/openfisma265/library/Doctrine/Migration/Process.php(171): Doctrine_Export->createConstraint('user_role', NULL, Array)
#3 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(492): Doctrine_Migration_Process->processCreatedConstraint(Array)
#4 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(452): Doctrine_Migration->_doMigrateStep('up', 33)
#5 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(301): Doctrine_Migration->_doMigrate(53)
#6 /srv/www/htdocs/openfisma265/library/Doctrine.php(885): Doctrine_Migration->migrate(NULL)
#7 /srv/www/htdocs/openfisma265/library/Doctrine/Task/Migrate.php(41): Doctrine::migrate('/srv/www/htdocs...', NULL)
#8 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(152): Doctrine_Task_Migrate->execute()
#9 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(92): Doctrine_Cli->_run(Array)
#10 /srv/www/htdocs/openfisma265/scripts/bin/doctrine-cli.php(129): Doctrine_Cli->run(Array)
#11 {main}
Error #3 - SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key
#0 /srv/www/htdocs/openfisma265/library/Doctrine/Connection.php(1032): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Mysql))
#1 /srv/www/htdocs/openfisma265/library/Doctrine/Export.php(620): Doctrine_Connection->execute('ALTER TABLE use...')
#2 /srv/www/htdocs/openfisma265/library/Doctrine/Migration/Process.php(135): Doctrine_Export->alterTable('user_role', Array)
#3 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(492): Doctrine_Migration_Process->processChangedColumn(Array)
#4 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(452): Doctrine_Migration->_doMigrateStep('up', 33)
#5 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(301): Doctrine_Migration->_doMigrate(53)
#6 /srv/www/htdocs/openfisma265/library/Doctrine.php(885): Doctrine_Migration->migrate(NULL)
#7 /srv/www/htdocs/openfisma265/library/Doctrine/Task/Migrate.php(41): Doctrine::migrate('/srv/www/htdocs...', NULL)
#8 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(152): Doctrine_Task_Migrate->execute()
#9 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(92): Doctrine_Cli->_run(Array)
#10 /srv/www/htdocs/openfisma265/scripts/bin/doctrine-cli.php(129): Doctrine_Cli->run(Array)
#11 {main}
Error #4 - SQLSTATE[HY000]: General error: 1005 Can't create table './openfisma265/#sql-111d_d3.frm' (errno: 150)
#0 /srv/www/htdocs/openfisma265/library/Doctrine/Connection.php(1032): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Mysql))
#1 /srv/www/htdocs/openfisma265/library/Doctrine/Export.php(523): Doctrine_Connection->execute('ALTER TABLE use...')
#2 /srv/www/htdocs/openfisma265/library/Doctrine/Migration/Process.php(195): Doctrine_Export->createForeignKey('user_role_organ...', Array)
#3 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(492): Doctrine_Migration_Process->processCreatedForeignKey(Array)
#4 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(452): Doctrine_Migration->_doMigrateStep('up', 33)
#5 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(301): Doctrine_Migration->_doMigrate(53)
#6 /srv/www/htdocs/openfisma265/library/Doctrine.php(885): Doctrine_Migration->migrate(NULL)
#7 /srv/www/htdocs/openfisma265/library/Doctrine/Task/Migrate.php(41): Doctrine::migrate('/srv/www/htdocs...', NULL)
#8 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(152): Doctrine_Task_Migrate->execute()
#9 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(92): Doctrine_Cli->_run(Array)
#10 /srv/www/htdocs/openfisma265/scripts/bin/doctrine-cli.php(129): Doctrine_Cli->run(Array)
#11 {main}
Error #5 - SQLSTATE[HY000]: General error: 1005 Can't create table './openfisma265/#sql-111d_d3.frm' (errno: 121)
#0 /srv/www/htdocs/openfisma265/library/Doctrine/Connection.php(1032): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Mysql))
#1 /srv/www/htdocs/openfisma265/library/Doctrine/Export.php(523): Doctrine_Connection->execute('ALTER TABLE use...')
#2 /srv/www/htdocs/openfisma265/library/Doctrine/Migration/Process.php(195): Doctrine_Export->createForeignKey('user_role', Array)
#3 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(492): Doctrine_Migration_Process->processCreatedForeignKey(Array)
#4 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(452): Doctrine_Migration->_doMigrateStep('up', 33)
#5 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(301): Doctrine_Migration->_doMigrate(53)
#6 /srv/www/htdocs/openfisma265/library/Doctrine.php(885): Doctrine_Migration->migrate(NULL)
#7 /srv/www/htdocs/openfisma265/library/Doctrine/Task/Migrate.php(41): Doctrine::migrate('/srv/www/htdocs...', NULL)
#8 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(152): Doctrine_Task_Migrate->execute()
#9 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(92): Doctrine_Cli->_run(Array)
#10 /srv/www/htdocs/openfisma265/scripts/bin/doctrine-cli.php(129): Doctrine_Cli->run(Array)
#11 {main}
5 error(s) encountered during migration
=======================================
Error #1 - SQLSTATE[HY000]: General error: 1025 Error on rename of './openfisma265/#sql-111d_d3' to './openfisma265/user_role' (errno: 150)
#0 /srv/www/htdocs/openfisma265/library/Doctrine/Connection.php(1068): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Mysql))
#1 /srv/www/htdocs/openfisma265/library/Doctrine/Export/Mysql.php(54): Doctrine_Connection->exec('ALTER TABLE use...')
#2 /srv/www/htdocs/openfisma265/library/Doctrine/Migration/Process.php(183): Doctrine_Export_Mysql->dropConstraint('user_role', NULL, true)
#3 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(492): Doctrine_Migration_Process->processDroppedConstraint(Array)
#4 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(452): Doctrine_Migration->_doMigrateStep('up', 33)
#5 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(301): Doctrine_Migration->_doMigrate(53)
#6 /srv/www/htdocs/openfisma265/library/Doctrine.php(885): Doctrine_Migration->migrate(NULL)
#7 /srv/www/htdocs/openfisma265/library/Doctrine/Task/Migrate.php(41): Doctrine::migrate('/srv/www/htdocs...', NULL)
#8 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(152): Doctrine_Task_Migrate->execute()
#9 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(92): Doctrine_Cli->_run(Array)
#10 /srv/www/htdocs/openfisma265/scripts/bin/doctrine-cli.php(129): Doctrine_Cli->run(Array)
#11 {main}
Error #2 - SQLSTATE[42000]: Syntax error or access violation: 1068 Multiple primary key defined
#0 /srv/www/htdocs/openfisma265/library/Doctrine/Connection.php(1068): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Mysql))
#1 /srv/www/htdocs/openfisma265/library/Doctrine/Export.php(378): Doctrine_Connection->exec('ALTER TABLE use...')
#2 /srv/www/htdocs/openfisma265/library/Doctrine/Migration/Process.php(171): Doctrine_Export->createConstraint('user_role', NULL, Array)
#3 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(492): Doctrine_Migration_Process->processCreatedConstraint(Array)
#4 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(452): Doctrine_Migration->_doMigrateStep('up', 33)
#5 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(301): Doctrine_Migration->_doMigrate(53)
#6 /srv/www/htdocs/openfisma265/library/Doctrine.php(885): Doctrine_Migration->migrate(NULL)
#7 /srv/www/htdocs/openfisma265/library/Doctrine/Task/Migrate.php(41): Doctrine::migrate('/srv/www/htdocs...', NULL)
#8 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(152): Doctrine_Task_Migrate->execute()
#9 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(92): Doctrine_Cli->_run(Array)
#10 /srv/www/htdocs/openfisma265/scripts/bin/doctrine-cli.php(129): Doctrine_Cli->run(Array)
#11 {main}
Error #3 - SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key
#0 /srv/www/htdocs/openfisma265/library/Doctrine/Connection.php(1032): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Mysql))
#1 /srv/www/htdocs/openfisma265/library/Doctrine/Export.php(620): Doctrine_Connection->execute('ALTER TABLE use...')
#2 /srv/www/htdocs/openfisma265/library/Doctrine/Migration/Process.php(135): Doctrine_Export->alterTable('user_role', Array)
#3 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(492): Doctrine_Migration_Process->processChangedColumn(Array)
#4 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(452): Doctrine_Migration->_doMigrateStep('up', 33)
#5 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(301): Doctrine_Migration->_doMigrate(53)
#6 /srv/www/htdocs/openfisma265/library/Doctrine.php(885): Doctrine_Migration->migrate(NULL)
#7 /srv/www/htdocs/openfisma265/library/Doctrine/Task/Migrate.php(41): Doctrine::migrate('/srv/www/htdocs...', NULL)
#8 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(152): Doctrine_Task_Migrate->execute()
#9 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(92): Doctrine_Cli->_run(Array)
#10 /srv/www/htdocs/openfisma265/scripts/bin/doctrine-cli.php(129): Doctrine_Cli->run(Array)
#11 {main}
Error #4 - SQLSTATE[HY000]: General error: 1005 Can't create table './openfisma265/#sql-111d_d3.frm' (errno: 150)
#0 /srv/www/htdocs/openfisma265/library/Doctrine/Connection.php(1032): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Mysql))
#1 /srv/www/htdocs/openfisma265/library/Doctrine/Export.php(523): Doctrine_Connection->execute('ALTER TABLE use...')
#2 /srv/www/htdocs/openfisma265/library/Doctrine/Migration/Process.php(195): Doctrine_Export->createForeignKey('user_role_organ...', Array)
#3 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(492): Doctrine_Migration_Process->processCreatedForeignKey(Array)
#4 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(452): Doctrine_Migration->_doMigrateStep('up', 33)
#5 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(301): Doctrine_Migration->_doMigrate(53)
#6 /srv/www/htdocs/openfisma265/library/Doctrine.php(885): Doctrine_Migration->migrate(NULL)
#7 /srv/www/htdocs/openfisma265/library/Doctrine/Task/Migrate.php(41): Doctrine::migrate('/srv/www/htdocs...', NULL)
#8 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(152): Doctrine_Task_Migrate->execute()
#9 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(92): Doctrine_Cli->_run(Array)
#10 /srv/www/htdocs/openfisma265/scripts/bin/doctrine-cli.php(129): Doctrine_Cli->run(Array)
#11 {main}
Error #5 - SQLSTATE[HY000]: General error: 1005 Can't create table './openfisma265/#sql-111d_d3.frm' (errno: 121)
#0 /srv/www/htdocs/openfisma265/library/Doctrine/Connection.php(1032): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Mysql))
#1 /srv/www/htdocs/openfisma265/library/Doctrine/Export.php(523): Doctrine_Connection->execute('ALTER TABLE use...')
#2 /srv/www/htdocs/openfisma265/library/Doctrine/Migration/Process.php(195): Doctrine_Export->createForeignKey('user_role', Array)
#3 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(492): Doctrine_Migration_Process->processCreatedForeignKey(Array)
#4 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(452): Doctrine_Migration->_doMigrateStep('up', 33)
#5 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(301): Doctrine_Migration->_doMigrate(53)
#6 /srv/www/htdocs/openfisma265/library/Doctrine.php(885): Doctrine_Migration->migrate(NULL)
#7 /srv/www/htdocs/openfisma265/library/Doctrine/Task/Migrate.php(41): Doctrine::migrate('/srv/www/htdocs...', NULL)
#8 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(152): Doctrine_Task_Migrate->execute()
#9 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(92): Doctrine_Cli->_run(Array)
#10 /srv/www/htdocs/openfisma265/scripts/bin/doctrine-cli.php(129): Doctrine_Cli->run(Array)
#11 {main}
#0 /srv/www/htdocs/openfisma265/library/Doctrine/Migration.php(312): Doctrine_Migration->_throwErrorsException()
#1 /srv/www/htdocs/openfisma265/library/Doctrine.php(885): Doctrine_Migration->migrate(NULL)
#2 /srv/www/htdocs/openfisma265/library/Doctrine/Task/Migrate.php(41): Doctrine::migrate('/srv/www/htdocs...', NULL)
#3 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(152): Doctrine_Task_Migrate->execute()
#4 /srv/www/htdocs/openfisma265/library/Doctrine/Cli.php(92): Doctrine_Cli->_run(Array)
#5 /srv/www/htdocs/openfisma265/scripts/bin/doctrine-cli.php(129): Doctrine_Cli->run(Array)
#6 {main}
Regenerating models because you ran migration.
Thanks
Dirk
I ran into this same problem and I have a workaround. Try the following.
Start off by running the following command in a shell (should be in the root directory of the openfisma installation).
$ sudo php scripts/bin/doctrine-cli.php generate-models-yaml
Now, go into MySQL and run the following queries:
mysql> update migration_version set version=51;
mysql> update configuration set value = '2.8.0r4' where name like 'yui_version';
mysql> update configuration set value = '2.6.5' where name like 'app_version';
After you run this, you need to reset Apache. On Debian, this looks like:
$ sudo apache2ctl restart
(You may have to adjust for your platform.)
Then go back to a shell and run the following commands:
$ sudo php scripts/bin/doctrine-cli.php migrate 50
$ sudo php scripts/bin/doctrine-cli.php migrate 53
When you're done, fix up all of your permissions with the following commands:
$ sudo chown -R apache:apache /var/www/openfisma
$ sudo find /var/www/openfisma -type f -exec chmod 660 {} \;
$ sudo find /var/www/openfisma -type d -exec chmod 770 {} \;
Hopefully this should get you running!
Hi,
Thanks for your answer.
i am sorry, but it seems not to work for me.
May be i do something wrong.
At what time in the migration process i should do your workaround?
i have migrated to 265, can login, but i can still get no Account list.
The results of your steps are ok:
./doctrine-cli.php migrate 50
migrate - migrated successfully to version #50
Regenerating models because you ran migration.
Elapsed time: 0 seconds
./doctrine-cli.php migrate 53
migrate - migrated successfully to version #53
Regenerating models because you ran migration.
Elapsed time: 1 seconds
in the development mode i can only see:
Warning: Call-time pass-by-reference has been deprecated in /openfisma265/application/controllers/UserController.php on line 221
and when i take a look at the query log and execute the sql statements manually, i get results:
73 Query SELECT COUNT(*) AS num_results FROM user u WHERE (u.deleted_at IS NULL)
73 Query SELECT u.id AS u__id, u.createdts AS u__createdts, u.modifiedts AS u__modifiedts, u.username AS u__username, u.password AS u__password, u.passwordsalt AS u__passwordsalt, u.passwordts AS u__passwordts, u.passwordhistory AS u__passwordhistory, u.hashtype AS u__hashtype, u.lastrob AS u__lastrob, u.locked AS u__locked, u.lockts AS u__lockts, u.locktype AS u__locktype, u.failurecount AS u__failurecount, u.lastloginip AS u__lastloginip, u.lastlogints AS u__lastlogints, u.title AS u__title, u.namefirst AS u__namefirst, u.namelast AS u__namelast, u.email AS u__email, u.emailvalidate AS u__emailvalidate, u.phoneoffice AS u__phoneoffice, u.phonemobile AS u__phonemobile, u.searchcolumnspref AS u__searchcolumnspref, u.notifyfrequency AS u__notifyfrequency, u.mostrecentnotifyts AS u__mostrecentnotifyts, u.notifyemail AS u__notifyemail, u.deleted_at AS u__deleted_at FROM user u WHERE (u.deleted_at IS NULL) ORDER BY u.username ASC LIMIT 20
I have over 2500 datasets in the database, so i would really like to migrate to your new version because of the security incident functionality.
maybe you can give me some further help/tips
Regards
Dirk
I see that you're not able to list the accounts. Is the rest of your data migrated correctly?
Can you run the following query and e-mail me the results (mhaase@endeavorsystems.com) -- I recommend that you do not post it here because it will contain names and email addresses of your users.
mysql> select * from user;
Hello,
I sent you the result of the query
As far as i could see, the rest seems working fine.
Regards
Dirk
Try the following query in MySQL:
mysql> update user set deleted_at = null;
This should allow you to list the accounts again.
Hi,
the value of the field in the database deleted_at was set to Null.
I run the query, but i still get the data error and
Warning: Call-time pass-by-reference has been deprecated in /srv/www/htdocs/openfisma265/application/controllers/UserController.php on line 221
This is the error i can see in the php log
i test the application if everything is working. everything seems working fine, unfortunately only the account list / users does not work.
If i try to create a new user i got the following error, may be it will be helpful
Fisma_Exception: Unable to save user.
#0 /srv/www/htdocs/openfisma265/application/controllers/BaseController.php(186): UserController->saveValue(Object(Fisma_Form)) #1 /srv/www/htdocs/openfisma265/application/controllers/UserController.php(573): BaseController->createAction() #2 /srv/www/htdocs/openfisma265/library/Zend/Controller/Action.php(513): UserController->createAction() #3 /srv/www/htdocs/openfisma265/library/Zend/Controller/Dispatcher/Standard.php(289): Zend_Controller_Action->dispatch('createAction') #4 /srv/www/htdocs/openfisma265/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #5 /srv/www/htdocs/openfisma265/library/Fisma.php(437): Zend_Controller_Front->dispatch() #6 /srv/www/htdocs/openfisma265/public/index.php(33): Fisma::dispatch() #7 {main}
Regards
Dirk
Hi,
if i set the environment to "development", i dont get the account list. now I set the environment to "production" i get the account list, with every user, role, etc..
But i cannot change a value from the user, like password. when i want to save the changes the following error occured:
2010-07-12T10:00:17-04:00 ERR (3): Fisma_Exception: Unable to save user.
#0 /srv/www/htdocs/openfisma265/application/controllers/BaseController.php(186): UserController->saveValue(Object(Fisma_Form)) #1 /srv/www/htdocs/openfisma265/application/controllers/UserController.php(573): BaseController->createAction() #2 /srv/www/htdocs/openfisma265/library/Zend/Controller/Action.php(513): UserController->createAction() #3 /srv/www/htdocs/openfisma265/library/Zend/Controller/Dispatcher/Standard.php(289): Zend_Controller_Action->dispatch('createAction') #4 /srv/www/htdocs/openfisma265/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #5 /srv/www/htdocs/openfisma265/library/Fisma.php(437): Zend_Controller_Front->dispatch() #6 /srv/www/htdocs/openfisma265/public/index.php(33): Fisma::dispatch() #7 {main} by root (1) from 127.0.0.1
Regards
Dirk
Hi,
it seems that there is my problem with migration/update on the user_role table.
On the 256 Version the table looks like:
userID primary key
roleid Primary key
userrole_id
on a fresh installation of 265 with a new database
userroleid primary key
roleid
userid
and the foreignkeys and Indizes are different.
it seems that this table is not migrated.
That seems to be the problem.
is there a way to change/upgrade this table. Script or something else?
Regards
Dirk
Hmm... Can you run the following queries also:
mysql> show tables;
mysql> show create table user_role;
mysql> show create table user_role_organization;
And post the results here.
Hi,
here the queries:
show tables:
"asset"
"bugtraq"
"comment"
"configuration"
"cve"
"document_type"
"email_validation"
"evaluation"
"event"
"evidence"
"finding"
"finding_audit_log"
"finding_bugtraq"
"finding_cve"
"finding_evaluation"
"finding_xref"
"ldap_config"
"migration_version"
"network"
"notification"
"organization"
"privilege"
"product"
"role"
"role_privilege"
"security_control"
"source"
"system"
"system_document"
"system_document_version"
"upload"
"user"
"user_audit_log"
"user_event"
"user_organization"
"user_role"
"xref"
show create table user_role;
"Table","Create Table"
"user_role","CREATE TABLE `user_role` (
`userid` bigint(20) NOT NULL default '0',
`roleid` bigint(20) NOT NULL default '0',
PRIMARY KEY (`userid`,`roleid`),
KEY `user_role_roleid_role_id` (`roleid`),
CONSTRAINT `user_role_roleid_role_id` FOREIGN KEY (`roleid`) REFERENCES `role` (`id`),
CONSTRAINT `user_role_userid_user_id` FOREIGN KEY (`userid`) REFERENCES `user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1"
show create table user_role_organization;
"Table","Create Table"
"user_role_organization","CREATE TABLE `user_role_organization` (
`userroleid` bigint(20) NOT NULL default '0',
`organizationid` bigint(20) NOT NULL default '0',
PRIMARY KEY (`userroleid`,`organizationid`),
KEY `user_role_organization_organizationid_idx` (`organizationid`),
KEY `user_role_organization_userroleid_idx` (`userroleid`),
CONSTRAINT `user_role_organization_organizationid_organization_id` FOREIGN KEY (`organizationid`) REFERENCES `organization` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1"
Dirk

Hi,
i got the following error:
/srv/www/htdocs/openfisma256/scripts/bin # ./doctrine-cli.php migrate
Warning: include_once(BasePrivilege.php): failed to open stream: No such file or directory in /srv/www/htdocs/openfisma256/library/Zend/Loader.php on line 146
Warning: include_once(): Failed opening 'BasePrivilege.php' for inclusion (include_path=':/srv/www/htdocs/openfisma256/application/models/generated:/srv/www/htdocs/openfisma256/application/models:/srv/www/htdocs/openfisma256/application/controllers:/srv/www/htdocs/openfisma256/application/models/listener:/srv/www/htdocs/openfisma256/library:/srv/www/htdocs/openfisma256/library/Pear:.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/htdocs/openfisma256/library/Zend/Loader.php on line 146
Fatal error: Class 'BasePrivilege' not found in /srv/www/htdocs/openfisma256/application/models/Privilege.php on line 28
Regards
Dirk