Upgrading after database import?
  • I am restoring a backup file from a previous version, but the SQL file was so large it couldn't be imported through a PHP script. The web host has done it for me, but of course this did not run the database upgrade to the current version so now Newscoop doesn't work. How can I run the other parts of the restore script while skipping the database import and without access to the admin interface?
  • 8 Comments sorted by
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    upload newscoop distribution and start /upgrade.php script
  • It doesn't work. I get this error: 

    SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Publications.url_error_tpl_id' in 'field list'#0 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(633): PDO->query('SELECT Publicat...') #1 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(580): Doctrine\DBAL\Connection->executeQuery('SELECT Publicat...', Array) #2 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/library/Newscoop/Doctrine/AdoDbAdapter.php(156): Doctrine\DBAL\Connection->fetchAll('SELECT Publicat...', Array) #3 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/classes/DbObjectArray.php(26): Newscoop\Doctrine\AdoDbAdapter->getAll('SELECT Publicat...') #4 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/classes/Publication.php(604): DbObjectArray::Create('Publication', 'SELECT Publicat...') #5 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/admin-files/init_content.php(12): Publication::GetPublications() #6 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/modules/admin/Bootstrap.php(72): require_once('/www/webvol20/l...') #7 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/bombayworks/zendframework1/library/Zend/Application/Bootstrap/BootstrapAbstract.php(669): Admin_Bootstrap->_initNewscoop() #8 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/bombayworks/zendframework1/library/Zend/Application/Bootstrap/BootstrapAbstract.php(622): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('newscoop') #9 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/bombayworks/zendframework1/library/Zend/Application/Bootstrap/BootstrapAbstract.php(586): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap(NULL) #10 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/bombayworks/zendframework1/library/Zend/Application/Resource/Modules.php(124): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap() #11 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/bombayworks/zendframework1/library/Zend/Application/Resource/Modules.php(110): Zend_Application_Resource_Modules->bootstrapBootstraps(Array) #12 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/bombayworks/zendframework1/library/Zend/Application/Bootstrap/BootstrapAbstract.php(683): Zend_Application_Resource_Modules->init() #13 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/bombayworks/zendframework1/library/Zend/Application/Bootstrap/BootstrapAbstract.php(626): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('modules') #14 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/bombayworks/zendframework1/library/Zend/Application/Bootstrap/BootstrapAbstract.php(586): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap(NULL) #15 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/bombayworks/zendframework1/library/Zend/Application.php(355): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap(NULL) #16 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application.php(47): Zend_Application->bootstrap() #17 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/upgrade.php(86): require_once('/www/webvol20/l...') #18 {main}
    Post edited by Sebastian Olsson (2) at 2013-08-20 09:59:32
  • It sems like it needs a current version of the database to start the upgrade process. It's missing some column in the database, but isn't this the code that will add any missing column? Is there any way around this? 

    Do I have to install an older version? What would be the oldest Newscoop version that can run the database upgrade on PHP 5.4? Does that version work with a database from version 2.6.7? 
  • I tried it with Newscoop 3.5.0, 3.5.3 and 3.5.5 and get the same error.
    Error: While upgrading the database: tables.sql (2.6.0): mysql: not found

    Why does this happen? There is nothing in the error log. And why is the database version 2.6.0 and not 2.6.7?

    I also tried with Newscoop 4.0.4 and 4.1.2 but it says
    Error: While upgrading the database: Can not upgrade from version older than 3.5.
    Upgrade into Newscoop 3.5 first.
    Post edited by Sebastian Olsson (2) at 2013-08-22 08:39:16
  • In the 3.5.x versions, I get this error in the log when I try to access the admin page.
    [22-Aug-2013 13:10:54 Europe/Stockholm] PHP Fatal error:  Class 'LocalizerLanguage' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/admin-files/localizer/Localizer.php on line 170

  • In version 4.0.0, I get this error in the log file.

    [22-Aug-2013 14:03:52 Europe/Stockholm] PHP Warning:  require_once(smarty/libs/Smarty.class.php): failed to open stream: No such file or directory in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/install/classes/CampTemplate.php on line 13
    [22-Aug-2013 14:03:52 Europe/Stockholm] PHP Fatal error:  require_once(): Failed opening required 'smarty/libs/Smarty.class.php' (include_path='/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/include:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/classes:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/classes/Extension:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/metaclasses:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/../library:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/library:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/include:.:/usr/local/share/pear') in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/install/classes/CampTemplate.php on line 13

  • In Newscoop 4.0.1, I can't install because of this error.
    [22-Aug-2013 15:41:54 Europe/Stockholm] PHP Warning:  require_once(smarty/libs/Smarty.class.php): failed to open stream: No such file or directory in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/install/classes/CampTemplate.php on line 13
    [22-Aug-2013 15:41:54 Europe/Stockholm] PHP Fatal error:  require_once(): Failed opening required 'smarty/libs/Smarty.class.php' (include_path='/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/classes:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/classes/Extension:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/metaclasses:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/../library:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/library:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/include:.:/usr/local/share/pear') in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/install/classes/CampTemplate.php on line 13

  • It is the same in 4.0.2 as the others, but in 4.0.3 I get a different error.

    [22-Aug-2013 16:42:20 Europe/Stockholm] PHP Fatal error:  Cannot redeclare class Zend_Session in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/zendframework/zendframework1/library/Zend/Session.php on line 50