Errors when upgrading from 5.5.6 to 5.6.14

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Etic
    Junior Member
    • Jan 2015
    • 9

    Errors when upgrading from 5.5.6 to 5.6.14

    Hi,

    When trying to upgrade from 5.5.6 to 5.6.14, those errors broke up the app:

    Code:
    [2020-11-19 05:33:34] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/home/user/www/application/Espo/Core/Utils/Database/Schema/Converter.php","line":316} []
    [2020-11-19 05:33:34] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/home/user/www/application/Espo/Core/Utils/Database/Schema/Converter.php","line":316} []
    [2020-11-19 05:33:48] Espo.ERROR: API [GET]:.*, Params:Array ( ) , InputData: - [] []
    [2020-11-19 05:33:48] Espo.ERROR: Display Error: , Code: 404 URL: /?entryPoint=LogoImage&id=559211c8e592f8458 [] []
    [2020-11-19 05:33:48] Espo.ERROR: Uncaught Exception Slim\Exception\Stop: "" at /home/user/www/vendor/slim/slim/Slim/Slim.php line 1022 {"exception":"[object] (Slim\\Exception\\Stop(code: 0): at /home/user/www/vendor/slim/slim/Slim/Slim.php:1022)"} []
    [2020-11-19 05:34:03] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/home/user/www/application/Espo/Core/Utils/Database/Schema/Converter.php","line":313} []
    [2020-11-19 05:34:03] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/home/user/www/application/Espo/Core/Utils/Database/Schema/Converter.php","line":313} []
    [2020-11-19 05:34:08] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/home/user/www/application/Espo/Core/Utils/Database/Schema/Converter.php","line":313} []
    [2020-11-19 05:34:08] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/home/user/www/application/Espo/Core/Utils/Database/Schema/Converter.php","line":313} []
    [2020-11-19 05:34:11] Espo.ERROR: Uncaught Exception ParseError: "syntax error, unexpected '?', expecting variable (T_VARIABLE)" at /home/user/www/application/Espo/ORM/Entity.php line 66 {"exception":"[object] (ParseError: ParseError: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /home/user/www/application/Espo/ORM/Entity.php:66\nStack trace:\n#0 /home/user/www/vendor/composer/ClassLoader.php(301): Composer\\Autoload\\includeFile('/home/user/S...')\n#1 [internal function]: Composer\\Autoload\\ClassLoader->loadClass('Espo\\\\ORM\\\\Entity')\n#2 /home/user/www/application/Espo/Core/Utils/Database/Orm/Converter.php(302): spl_autoload_call('Espo\\\\ORM\\\\Entity')\n#3 /home/user/www/application/Espo/Core/Utils/Database/Orm/Converter.php(203): Espo\\Core\\Utils\\Database\\Orm\\Converter->convertFields('ActionHistoryRe...', Array)\n#4 /home/user/www/application/Espo/Core/Utils/Database/Orm/Converter.php(181): Espo\\Core\\Utils\\Database\\Orm\\Converter->convertEntity('ActionHistoryRe...', Array)\n#5 /home/user/www/application/Espo/Core/Utils/Database/Converter.php(67): Espo\\Core\\Utils\\Database\\Orm\\Converter->process()\n#6 /home/user/www/application/Espo/Core/Utils/Metadata/OrmMetadata.php(93): Espo\\Core\\Utils\\Database\\Converter->process()\n#7 /home/user/www/application/Espo/Core/Loaders/EntityManager.php(45): Espo\\Core\\Utils\\Metadata\\OrmMetadata->getData()\n#8 /home/user/www/application/Espo/Core/Container.php(78): Espo\\Core\\Loaders\\EntityManager->load()\n#9 /home/user/www/application/Espo/Core/Container.php(44): Espo\\Core\\Container->load('entityManager')\n#10 /home/user/www/application/Espo/Core/Utils/Auth.php(116): Espo\\Core\\Container->get('entityManager')\n#11 /home/user/www/application/Espo/Core/Utils/Auth.php(161): Espo\\Core\\Utils\\Auth->getEntityManager()\n#12 /home/user/www/application/Espo/Core/Utils/Api/Auth.php(131): Espo\\Core\\Utils\\Auth->login('u94jd3s', '1e5e7a83e9200f6...', NULL)\n#13 /home/user/www/application/Espo/Core/Utils/Api/Slim.php(125): Espo\\Core\\Utils\\Api\\Auth->call()\n#14 /home/user/www/application/Espo/Core/Application.php(93): Espo\\Core\\Utils\\Api\\Slim->run()\n#15 /home/user/www/api/v1/index.php(33): Espo\\Core\\Application->run()\n#16 {main})"} []
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Hi there.
    I've chacked it and the system was upgraded successfully.
    What are your web server PHP and DB version?

    Please check the webserver and DB logs files in order to gather more info about the error origin.

    When you are making such sort of things like upgrade, all your replaced (old) files are stored in the /data/.backup/upgrades/folder-with-backup-files. So in order to restore your system, you can replace the 'upgraded' files by replacing them with the files located in /data/.backup/upgrades/folder-with-backup-files. Here are a few notes:
    1. .backup directory is a hidden directory;
    2. 'folder-with-backup-files' is represented as the folder named with long ID. The directory you need has the same time & date as your upgrade action.
    3. After replacing all files, please run from CLI this command: php rebuild.php

    Comment

    • Etic
      Junior Member
      • Jan 2015
      • 9

      #3
      Thanks for your answer, sorry for the late follow up, I was too busy to resolve that before.

      I'm on PHP 7.2 with Apache 2.4 and MariaDB 10.2.36. I'll do the checkup with DB logs when trying the upgrade again.
      I have already restore the older working version, I had a complete files/DB backup. But thanks for the instructions on how it really works behind (like restoring the old files, but does it works without rolling back the DB?).

      Comment

      • esforim
        Active Community Member
        • Jan 2020
        • 2204

        #4
        It important to re-roll Database (DB) too, because (some) upgrade change some of the Table, Field and their Name. If you reroll everything but don't reroll Database then you going to see plenty of error (or Espo not working at all).

        Comment

        Working...