upgrade error 7.3 to latest version

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marketgy
    Member
    • Apr 2020
    • 38

    upgrade error 7.3 to latest version

    I just went through several upgrades to get to the latest from the CLI and now I'm seeing the errors below 1 in the error log in the main directory and the other from the data/logs...

    error log

    [01-Jun-2024 17:20:01 UTC] PHP Parse error: syntax error, unexpected identifier "Config", expecting variable in /home/catorg/public_html/crm/application/Espo/Core/Log/LogLoader.php on line 52


    espo log

    [2024-06-01 17:11:36] ERROR: Uncaught Exception Espo\Core\Utils\File\Exceptions\PermissionError: "Permission denied for data/cache/application/modules.php" at /home/catorg/public_html/crm/application/Espo/Core/Utils/File/Manager.php line 321 {"exception":"[object] (Espo\\Core\\Utils\\File\\Exceptions\\PermissionEr ror(code: 0): Permission denied for data/cache/application/modules.php at /home/catorg/public_html/crm/application/Espo/Core/Utils/File/Manager.php:321)"}

  • marketgy
    Member
    • Apr 2020
    • 38

    #2
    Got it up and running, Yuris post was helpful mentioning the permission fixes...

    Comment

    • Reaper_ZA
      Junior Member
      • Jan 2022
      • 7

      #3
      Seems I'm having a similar problem.

      However I did redo all the permissions for the files/folders in question.

      My apache Error log is exactly the same, however my Espo Log not so much

      [2024-07-01 06:13:03] WARNING: E_WARNING: touch(): Unable to create file /var/www/espocrm/data/logs/espo-2024-07-01.log because Permission denied
      [2024-07-01 06:13:03] WARNING: Cron is not run because it's disabled with 'cronDisabled' param.
      [2024-07-01 06:14:02] WARNING: E_WARNING: touch(): Unable to create file data/cache/application/objMetadata.php because Permission denied
      [2024-07-01 06:14:03] WARNING: E_WARNING: touch(): Unable to create file data/cache/application/ormMetadata.php because Permission denied
      [2024-07-01 06:14:03] ERROR: (0) Uncaught Exception Espo\Core\Utils\File\Exceptions\PermissionError: "Permission denied for data/cache/application/ormMetadata.php" at /var/www/espocrm/application/Espo/Core/Utils/File/Manager.php line 321 :: /var/www/espocrm/application/Espo/Core/Utils/File/Manager.php(321)
      [2024-07-01 06:20:04] WARNING: E_WARNING: touch(): Unable to create file data/cache/application/cronLastRunTime.php because Permission denied
      [2024-07-01 06:20:04] ERROR: (0) Uncaught Exception Espo\Core\Utils\File\Exceptions\PermissionError: "Permission denied for data/cache/application/cronLastRunTime.php" at /var/www/espocrm/application/Espo/Core/Utils/File/Manager.php line 321 :: /var/www/espocrm/application/Espo/Core/Utils/File/Manager.php(321)
      [2024-07-01 07:17:03] WARNING: E_WARNING: touch(): Unable to create file data/cache/application/cronLastRunTime.php because Permission denied
      [2024-07-01 07:17:03] ERROR: (0) Uncaught Exception Espo\Core\Utils\File\Exceptions\PermissionError: "Permission denied for data/cache/application/cronLastRunTime.php" at /var/www/espocrm/application/Espo/Core/Utils/File/Manager.php line 321 :: /var/www/espocrm/application/Espo/Core/Utils/File/Manager.php(321)




      Comment

      • Reaper_ZA
        Junior Member
        • Jan 2022
        • 7

        #4
        Originally posted by Reaper_ZA
        Seems I'm having a similar problem.

        However I did redo all the permissions for the files/folders in question.

        My apache Error log is exactly the same, however my Espo Log not so much

        [2024-07-01 06:13:03] WARNING: E_WARNING: touch(): Unable to create file /var/www/espocrm/data/logs/espo-2024-07-01.log because Permission denied
        [2024-07-01 06:13:03] WARNING: Cron is not run because it's disabled with 'cronDisabled' param.
        [2024-07-01 06:14:02] WARNING: E_WARNING: touch(): Unable to create file data/cache/application/objMetadata.php because Permission denied
        [2024-07-01 06:14:03] WARNING: E_WARNING: touch(): Unable to create file data/cache/application/ormMetadata.php because Permission denied
        [2024-07-01 06:14:03] ERROR: (0) Uncaught Exception Espo\Core\Utils\File\Exceptions\PermissionError: "Permission denied for data/cache/application/ormMetadata.php" at /var/www/espocrm/application/Espo/Core/Utils/File/Manager.php line 321 :: /var/www/espocrm/application/Espo/Core/Utils/File/Manager.php(321)
        [2024-07-01 06:20:04] WARNING: E_WARNING: touch(): Unable to create file data/cache/application/cronLastRunTime.php because Permission denied
        [2024-07-01 06:20:04] ERROR: (0) Uncaught Exception Espo\Core\Utils\File\Exceptions\PermissionError: "Permission denied for data/cache/application/cronLastRunTime.php" at /var/www/espocrm/application/Espo/Core/Utils/File/Manager.php line 321 :: /var/www/espocrm/application/Espo/Core/Utils/File/Manager.php(321)
        [2024-07-01 07:17:03] WARNING: E_WARNING: touch(): Unable to create file data/cache/application/cronLastRunTime.php because Permission denied
        [2024-07-01 07:17:03] ERROR: (0) Uncaught Exception Espo\Core\Utils\File\Exceptions\PermissionError: "Permission denied for data/cache/application/cronLastRunTime.php" at /var/www/espocrm/application/Espo/Core/Utils/File/Manager.php line 321 :: /var/www/espocrm/application/Espo/Core/Utils/File/Manager.php(321)



        More info to this, I removed all extensions, and then did a OS and EspoCRM update to the latest version.

        Currently running Debian 11 with PHP 8.3.8 and the latest version 8.3.3 (I think) of EspoCRM

        Comment

        • Reaper_ZA
          Junior Member
          • Jan 2022
          • 7

          #5
          Any help will be appreciated.

          Alternatively I assume I will need to do a re-installation?

          Comment

          • victor
            Active Community Member
            • Aug 2022
            • 727

            #6
            However I did redo all the permissions for the files/folders in question.
            Most likely, you have not granted all the necessary permissions. Go to the folder where your instance is installed and run the following commands (in your case, maybe without sudo):
            Code:
            sudo find . -type d -exec chmod 755 {} + && sudo find . -type f -exec chmod 644 {} +;
            sudo find data custom client/custom -type d -exec chmod 775 {} + && sudo find data custom client/custom -type f -exec chmod 664 {} +;
            sudo chmod 775 application/Espo/Modules client/modules;
            sudo chmod 754 bin/command;
            sudo chown -R www-data:www-data .;​
            More about permissions: https://docs.espocrm.com/administrat...n/#permissions.

            Comment

            • Reaper_ZA
              Junior Member
              • Jan 2022
              • 7

              #7
              Hi Victor, I ran just that before I posted here.

              so all the files/folders permissions etc are as they should be.

              Did it again now, just to be sure. But seems its still the same.


              ```[Tue Jul 02 11:48:46.310031 2024] [php:error] [pid 1735] [client 102.38.60.18:1490] PHP Parse error: syntax error, unexpected identifier "Config", expecting variable in /var/www/espocrm/application/Espo/Core/Log/LogLoader.php on line 52

              ​```

              Still on this error on the apache logs.

              However there are no new log entries in the Espo logs.


              Last edited by Reaper_ZA; 07-02-2024, 09:50 AM.

              Comment

              • victor
                Active Community Member
                • Aug 2022
                • 727

                #8
                Compare if the PHP versions on localhost and in CLI match:
                - for cli: php -v
                - for localhost you need to create a file with the content: localhost/info.php:

                PHP Code:
                <?php
                phpinfo();
                ?>

                Comment

                • Reaper_ZA
                  Junior Member
                  • Jan 2022
                  • 7

                  #9
                  Originally posted by victor
                  Compare if the PHP versions on localhost and in CLI match:
                  - for cli: php -v
                  - for localhost you need to create a file with the content: localhost/info.php:

                  PHP Code:
                  <?php
                  phpinfo();
                  ?>
                  You Sir are a legend! that was the problem. Didn't even think about checking the webserver PHP version when I did the upgrade... realised I missed disabling version 8.0.3...

                  Thank you! All working as it should!

                  Comment

                  Working...