1

I'm trying an update on the CLI and get the following error.

If I do it again afterwards I get told that everything is up to date. If I want to install a plugin then I still get the message that I should update to the current version.

Who can tell me what I am doing wrong or where the mistake lies?

$ php-7.2-cli -d allow_url_fopen=1 craft update all
Fetching available updates ... done
Performing one update:

    - craft 3.1.25 => 3.1.28

Backup the database? (yes|no) [yes]:yes
Backing up the database ... done
Performing update with Composer ... done
Applying new migrations ... error: The command "'/home/lichtebs/CraftCMS-ALL/craft' 'migrate/all' '--no-content'" failed.

Exit Code: 255(Unknown error)

Working directory: /home/lichtebs/CraftCMS-ALL

Output:
================
Content-type: text/html

<br />
<b>Warning</b>:  Unexpected character in input:  '' (ASCII=92) state=1 in <b>/home/lichtebs/CraftCMS-ALL/craft</b> on line <b>16</b><br />
<br />
<b>Parse error</b>:  syntax error, unexpected T_STRING in <b>/home/lichtebs/CraftCMS-ALL/craft</b> on line <b>16</b><br />

Restore the database backup? (yes|no) [yes]:yes
Restoring the database backup ... done
Revert the Composer changes? (yes|no) [yes]:yes
Reverting Composer changes ... error: The command "'/home/lichtebs/CraftCMS-ALL/craft' 'update/composer-install'" failed.

Exit Code: 255(Unknown error)

Working directory: /home/lichtebs/CraftCMS-ALL

Output:
================
Content-type: text/html

<br />
<b>Warning</b>:  Unexpected character in input:  '\' (ASCII=92) state=1 in <b>/home/lichtebs/CraftCMS-ALL/craft</b> on line <b>16</b><br />
<br />
<b>Parse error</b>:  syntax error, unexpected T_STRING in <b>/home/lichtebs/CraftCMS-ALL/craft</b> on line <b>16</b><br />
1

It looks like you need to have php-7.2-cli -d allow_url_fopen=1 in front of your craft commands. When you run craft update all, Craft then tries to run migrations (craft migrate/all) but without your php-7.2-cli... declaration it seems to fails.

If you have access to composer, you could try to update 'manually' instead of running craft update.

  1. run composer update
  2. then php-7.2-cli -d allow_url_fopen=1 craft migrate/all
1

ah ok, I did not think that it will be redirected. Then I realize that these configs can not get through. Then I'll go and reconfigure the CLI that I do not have to pass the parameters. Because then it would have to work "normally"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.