Answers.Body: <p>It looks like you need to have <code>php-7.2-cli -d allow_url_fopen=1</code> in front of your <code>craft</code> commands. When you run <code>craft update all</code>, Craft then tries to run migrations (<code>craft migrate/all</code>) but without your <code>php-7.2-cli...</code> declaration it seems to fails. </p>
  
  <p>If you have access to composer, you could try to update 'manually' instead of running <code>craft update</code>.</p>
  
  <ol>
  <li>run <code>composer update</code></li>
  <li>then <code>php-7.2-cli -d allow_url_fopen=1 craft migrate/all</code></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-28T14:23:46.987Z
Answers.LastActivityDate: 2019-05-28T14:23:46.987Z
Answers.UserDisplayName: Oli
Answers.Body: <p>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"</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-28T19:35:18.653Z
Answers.LastActivityDate: 2019-05-28T19:35:18.653Z
Answers.UserDisplayName: Christian Säum
Body: <p>I'm trying an update on the CLI and get the following error.</p>
  
  <p>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.</p>
  
  <p>Who can tell me what I am doing wrong or where the mistake lies?</p>
  
  <pre><code>$ php-7.2-cli -d allow_url_fopen=1 craft update all
  Fetching available updates ... done
  Performing one update:
  
      - craft 3.1.25 =&gt; 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
  
  &lt;br /&gt;
  &lt;b&gt;Warning&lt;/b&gt;:  Unexpected character in input:  '' (ASCII=92) state=1 in &lt;b&gt;/home/lichtebs/CraftCMS-ALL/craft&lt;/b&gt; on line &lt;b&gt;16&lt;/b&gt;&lt;br /&gt;
  &lt;br /&gt;
  &lt;b&gt;Parse error&lt;/b&gt;:  syntax error, unexpected T_STRING in &lt;b&gt;/home/lichtebs/CraftCMS-ALL/craft&lt;/b&gt; on line &lt;b&gt;16&lt;/b&gt;&lt;br /&gt;
  
  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
  
  &lt;br /&gt;
  &lt;b&gt;Warning&lt;/b&gt;:  Unexpected character in input:  '\' (ASCII=92) state=1 in &lt;b&gt;/home/lichtebs/CraftCMS-ALL/craft&lt;/b&gt; on line &lt;b&gt;16&lt;/b&gt;&lt;br /&gt;
  &lt;br /&gt;
  &lt;b&gt;Parse error&lt;/b&gt;:  syntax error, unexpected T_STRING in &lt;b&gt;/home/lichtebs/CraftCMS-ALL/craft&lt;/b&gt; on line &lt;b&gt;16&lt;/b&gt;&lt;br /&gt;
  </code></pre>
  
Tags: <craft3>
Title: update via CLI with error!
ThreadText: # update via CLI with error!
  
  (Asked by: username_0 on 2019-05-26)
  
  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 />
  
  ```
  
  **Tags:** craft3
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-05-28. Score: 2 | Accepted answer
  
  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`
  
  
  ---
  
  ### Answer by username_0 on 2019-05-28. Score: 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"
  
  
  ---
  
  