Error 500 After Upgrade From 5.4.5 to 5.5.6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tobias
    Senior Member
    • May 2016
    • 229

    Error 500 After Upgrade From 5.4.5 to 5.5.6

    Today, we tried to upgrade from 5.4.5 to 5.5.6. However, Espo is no longer functioning after the upgrade attempt.

    No logs in data/logs, but the following in the app log:

    [28-Jan-2019 04:30:29 America/Los_Angeles] PHP Warning: require_once(D:\home\site\wwwroot\crm\vendor/composer/autoload_real.php): failed to open stream: No such file or directory in D:\home\site\wwwroot\crm\vendor\autoload.php on line 5
    [28-Jan-2019 04:30:29 America/Los_Angeles] PHP Fatal error: require_once(): Failed opening required 'D:\home\site\wwwroot\crm\vendor/composer/autoload_real.php' (include_path='D:\home\site\wwwroot\crm') in D:\home\site\wwwroot\crm\vendor\autoload.php on line 5


    When trying to manually rebuild the app, the following is returned:

    PHP Warning: require_once(D:\home\site\wwwroot\crm\vendor/composer/autoload_real.php): failed to open stream: No such file or directory in D:\home\site\wwwroot\crm\vendor\autoload.php on line 5 PHP Fatal error: require_once(): Failed opening required 'D:\home\site\wwwroot\crm\vendor/composer/autoload_real.php' (include_path='D:\home\site\wwwroot\crm') in D:\home\site\wwwroot\crm\vendor\autoload.php on line 5

    We've also checked permissions/chmod 644 of the /index.php files in root + apI/v1/ folders with no effect.

    Any hints?
  • tobias
    Senior Member
    • May 2016
    • 229

    #2
    Hi there, we really need to get Espo up and running again. Your help is much appreciated (we use the Advanced Pack, btw).

    Comment

    • Maximus
      Senior Member
      • Nov 2018
      • 2731

      #3
      Hello,
      have you checked another permission according to the documentation https://www.espocrm.com/documentatio...-based-systems?
      Last edited by Maximus; 01-29-2019, 09:04 AM.

      Comment

      • item
        Active Community Member
        • Mar 2017
        • 1476

        #4
        Hi,
        you must explain how upgrade have you do !
        wich version to witch version .. maybe that can help.


        But I do so and I am a old school :
        copy composer.json from GitHub/espocrm to root directory

        then :
        PHP Code:
        php composer.phar validate 
        
        make backup first..
        If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

        Comment

        • tobias
          Senior Member
          • May 2016
          • 229

          #5
          Maximus Permissions are all set and as you can see in the error log, it's about a missing composer file.
          item Please see the title of the thread: Error 500 After Upgrade From 5.4.5 to 5.5.6 - so this was just a minor update and Espo was running just fine before. We haven't used composer to install Espo so far.

          Any other ideas?

          Comment

          • tobias
            Senior Member
            • May 2016
            • 229

            #6
            Or, is there a guide how to install Espo again with an existing database?

            Comment

            • Maximus
              Senior Member
              • Nov 2018
              • 2731

              #7
              Yes. This will help you https://www.espocrm.com/documentatio...p-and-restore/

              Comment

              • tobias
                Senior Member
                • May 2016
                • 229

                #8
                Maximus Thanks, but I'm afraid this won't work, since the old database seems to be corrupted by the last upgrade. What I did so far:
                Uploaded the Espo files of the version we used prior to the upgrade attempt, which was 5.4.5 to /crm
                Used the old data/config.php file for the new files
                Set the permissions again as explained here: https://www.espocrm.com/documentatio...configuration/
                Did a php rebuild.php

                Now, Espo is running again with the following drawbacks:
                1. Former admin users no longer have admin permissions, although the users have the proper permissions set in the database (Is_admin=1).
                2. Images/icons are missing (which is clear, since we also need to copy the static/upload files to the data folder).
                3. Advanced pack menu is shown, but not functioning (which is clear, since the advanced pack has not yet been installed, due to the lack of permissions).
                At first, I thought this to be a cache issue. However, php clear_cache.php had no effect.

                Any idea, what else we can try? Or, is there a way to do a clean new install and migrate the date (Contacts etc.)?
                Last edited by tobias; 01-30-2019, 02:04 PM.

                Comment

                • Maximus
                  Senior Member
                  • Nov 2018
                  • 2731

                  #9
                  The best way is also to do a clean new install and migrate the data, but first of all, you should have your DB backup in a separate folder to be calm and sure that if something went wrong you always can try again.
                  Also, you can change in your DB with phpMyAdmin fields "Is_admin=1" to "Is_admin=0" to for those who are not an admin and vice-versa, and change the field "type" from admin to regular and vice-versa.

                  Comment

                  • tobias
                    Senior Member
                    • May 2016
                    • 229

                    #10
                    Maximus Thanks again. I've just created a dump using Workbench. I will now proceed with a clean install. Can you explain, how to migrate the old data after the install?

                    Comment

                    • tanya
                      Senior Member
                      • Jun 2014
                      • 4308

                      #11
                      Hello,
                      I hope this will be helpfuf https://github.com/espocrm/documenta...and-restore.md

                      Comment

                      • tobias
                        Senior Member
                        • May 2016
                        • 229

                        #12
                        tanya Thanks, this helped. What we did so far:
                        1. Installed Espo again and upgraded to its latest version 5.5.7
                        2. Installed the latest Advanced Pack 1.33.7
                        3. Created a backup of the database
                        4. Imported our backup of the old database (Espo version back then was 5.4.5)
                        Everything went well.

                        However, when loading Espo again, we get the following error:
                        Code:
                        2019-01-31 13:43:55] Espo.ERROR: Uncaught Exception PDOException: "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'phoneNumbers.opt_out' in 'field list'" at /home/site/wwwroot/application/Espo/ORM/DB/Mapper.php line 73 {"exception":"[object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'phoneNumbers.opt_out' in 'field list' at /home/site/wwwroot/application/Espo/ORM/DB/Mapper.php:73)"} []
                        I guess this is a migration issue due to the newer version running at the moment, right?

                        Also, what data (i.e., static files like images, documents etc.) do we have to migrate from the old Espo to the new installation?

                        Thanks for your help.
                        Last edited by tobias; 01-31-2019, 02:00 PM.

                        Comment

                        • tobias
                          Senior Member
                          • May 2016
                          • 229

                          #13
                          Update: We were able to fix the missing fields by simply adding them to the respective tables.

                          The only errors left in the log are the following:

                          Code:
                          [2019-01-31 15:53:21] Espo.ERROR: API [GET]:.*, Params:Array ( ) , InputData:  -  [] []
                          [2019-01-31 15:53:21] Espo.ERROR: Display Error: , Code: 404 URL: /?entryPoint=avatar&size=small&id=56264c797e1b5537b&t=1548949990374 [] []
                          [2019-01-31 15:53:21] Espo.ERROR: Uncaught Exception Slim\Exception\Stop: "" at /home/site/wwwroot/vendor/slim/slim/Slim/Slim.php line 1022 {"exception":"[object] (Slim\\Exception\\Stop(code: 0):  at /home/site/wwwroot/vendor/slim/slim/Slim/Slim.php:1022)"} []
                          So, please help regarding migration of static files (which should fix the 404 errors) as well as regarding the API and Slim errors.

                          Or are all these errors related to the missing static files?

                          Thanks again.
                          Last edited by tobias; 01-31-2019, 03:58 PM.

                          Comment

                          • tanya
                            Senior Member
                            • Jun 2014
                            • 4308

                            #14
                            Hello,
                            the content of all attachments are in data/upload folder.
                            copy it from from the old instance, please

                            Comment

                            • tobias
                              Senior Member
                              • May 2016
                              • 229

                              #15
                              Hi again, I've copied all files from the old instance to the new one, but avatar images, documents, attachments etc. are still not shown.
                              We also have cleared the cache in both the browser and Espo interface.

                              Do we have to rebuild? Or is there any other things to consider?

                              Comment

                              Working...