Announcement

Collapse
No announcement yet.

Upgrade from 5.9.4 -> 6.0.3 without CLI

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Upgrade from 5.9.4 -> 6.0.3 without CLI

    Hi!

    I´m running version 5.9.4 on a hosting package which offers no CLI access. Although not recommended, installing the upgrade packages via Webinterface worked flawlessly so far.

    But in updating to 6.0.3 I hit a barrier: the web updater says: "This upgrade can be run only from CLI.".

    What are my options?

  • #2
    Hi there,
    please check out for this post https://forum.espocrm.com/forum/anno...3859#post63859.

    If you will chose the second option then you will need do something like this:
    In the file /EspoCRM-upgrade-5.9.4-to-6.0.3/scripts/BeforeUpgrade.php find this piece of code:
    PHP Code:
    protected function processCheckCLI()
    {
        
    $isCli = (substr(php_sapi_name(), 03) == 'cli') ? true false;

        if (!
    $isCli) {
            throw new 
    Error("This upgrade can be run only from CLI.");
        }

    Rewrite this function as follows:
    PHP Code:
    protected function processCheckCLI()
    {

    After, zip files again to make the upgrade package and upgrade your system.

    Also, to make sure that your system data in safe, you can ask your server support team to make a backup of your instance and its DB before the upgrade

    Comment


    • #3
      I backed up and followed your suggestions. Unfortunately the upgrade failed with an error "null". Nothing in the php error log. Login mask appears on http, on https just a white screen. After that login fails with a 500 server error on 2FA. Had to roll back all changes. :-(

      So my only option seems to be to move everything to a root server, perform updates there and then move everything back to the hosting package. Right?

      Comment


      • #4
        You also can try this:
        1. Open the same /EspoCRM-upgrade-5.9.4-to-6.0.3/scripts/BeforeUpgrade.php file;
        2. Remove the line: $this->processCheckCLI(); from the public function run($container)
        3. Remove the whole function - protected function processCheckCLI()
        4. Zip files again and upgrade EspoCRM.

        Comment


        • #5
          Hi, are you able to run cron jobs in your hosting? I did it that way. If you need, I can send the respective code, I used

          Comment


          • #6
            Who host are you with? I think all Host will have CLI offer. Even shared hosting.

            Comment


          • #7
            Originally posted by Maximus View Post
            You also can try this:
            1. Open the same /EspoCRM-upgrade-5.9.4-to-6.0.3/scripts/BeforeUpgrade.php file;
            2. Remove the line: $this->processCheckCLI(); from the public function run($container)
            3. Remove the whole function - protected function processCheckCLI()
            4. Zip files again and upgrade EspoCRM.
            Hi Maximus ,

            I am also getting the same error. I have followed the suggested solutions but the same error continues to appear.

            Comment


            • #8
              Download the code base and the underlying MySql DB. Install locally and do the upgrade. Then re-upload your code base and MySql data?

              Comment


              • #9
                I will set up a virtual server and try.

                Comment

                Working...
                X