[Support Request]: Update Error #2507

Closed
opened 2026-02-05 04:21:56 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @xdaniel2063 on GitHub (Nov 26, 2021).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Hello,
I tried to update from 21.10.3 to 21.11 and got the following error:

Script @php artisan package:discover --ansi handling the post-autoload-dump even                                      t returned with error code 1
$ ^C
$ php artisan cache:clear
php artisan config:clear
php artisan view:clear
In TestDatabases.php line 160:

  syntax error, unexpected ')'
$
In TestDatabases.php line 160:

  syntax error, unexpected ')'

Please find a screenshot here:
https://i.imgur.com/xQGX329.png
I don't know how to fix this. Other updates before were no problem.
Thanks in advance for any help.
Best, Daniel

Exact BookStack Version

21.11

Log Content

No response

PHP Version

7.4.26

Hosting Environment

Plesk Obsidian v18.0.39_build1800211117.18 os_Ubuntu 18.04

Originally created by @xdaniel2063 on GitHub (Nov 26, 2021). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Hello, I tried to update from 21.10.3 to 21.11 and got the following error: ``` Script @php artisan package:discover --ansi handling the post-autoload-dump even t returned with error code 1 $ ^C $ php artisan cache:clear php artisan config:clear php artisan view:clear In TestDatabases.php line 160: syntax error, unexpected ')' $ In TestDatabases.php line 160: syntax error, unexpected ')' ``` Please find a screenshot here: https://i.imgur.com/xQGX329.png I don't know how to fix this. Other updates before were no problem. Thanks in advance for any help. Best, Daniel ### Exact BookStack Version 21.11 ### Log Content _No response_ ### PHP Version 7.4.26 ### Hosting Environment Plesk Obsidian v18.0.39_build1800211117.18 os_Ubuntu 18.04
OVERLORD added the 🐕 Support label 2026-02-05 04:21:56 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Nov 26, 2021):

Hi @xdaniel2063,
Can you provide the exact output of the following two commands:

php -v
composer -V
@ssddanbrown commented on GitHub (Nov 26, 2021): Hi @xdaniel2063, Can you provide the exact output of the following two commands: ```bash php -v composer -V ```
Author
Owner

@xdaniel2063 commented on GitHub (Nov 26, 2021):

Hello @ssddanbrown,

here it is:

$ php -v
PHP 7.2.24-0ubuntu0.18.04.10 (cli) (built: Oct 25 2021 17:47:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
    with Zend OPcache v7.2.24-0ubuntu0.18.04.10, Copyright (c) 1999-2018, by Zend Technologies

But when I run phpinfo it is this:
PHP Version 7.4.26

$ composer -v
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.10.23 2021-10-05 09:44:27

Best, Daniel

@xdaniel2063 commented on GitHub (Nov 26, 2021): Hello @ssddanbrown, here it is: ``` $ php -v PHP 7.2.24-0ubuntu0.18.04.10 (cli) (built: Oct 25 2021 17:47:59) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd. with Zend OPcache v7.2.24-0ubuntu0.18.04.10, Copyright (c) 1999-2018, by Zend Technologies ``` But when I run phpinfo it is this: PHP Version 7.4.26 -- ``` $ composer -v ______ / ____/___ ____ ___ ____ ____ ________ _____ / / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/ / /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ / \____/\____/_/ /_/ /_/ .___/\____/____/\___/_/ /_/ Composer version 1.10.23 2021-10-05 09:44:27 ``` Best, Daniel
Author
Owner

@ssddanbrown commented on GitHub (Nov 26, 2021):

Hi @xdaniel2063,

You likely have two versions of PHP installed on your system, where php7.2 is the default active for the command line.
You can often choose to run things with a specific version of php. For example:

php7.4 artisan cache:clear
@ssddanbrown commented on GitHub (Nov 26, 2021): Hi @xdaniel2063, You likely have two versions of PHP installed on your system, where php7.2 is the default active for the command line. You can often choose to run things with a specific version of php. For example: ```bash php7.4 artisan cache:clear ```
Author
Owner

@xdaniel2063 commented on GitHub (Nov 26, 2021):

Hello @ssddanbrown,

thank you.

/opt/plesk/php/7.4/bin/php artisan cache:clear

worked. Should I run all commands of the updates this way?

@xdaniel2063 commented on GitHub (Nov 26, 2021): Hello @ssddanbrown, thank you. `/opt/plesk/php/7.4/bin/php artisan cache:clear` worked. Should I run all commands of the updates this way?
Author
Owner

@ssddanbrown commented on GitHub (Nov 26, 2021):

Should I run all commands of the updates this way?

Ideally, since php7.2 is not supported. Alternatively, if not in use anymore, you could look to remove php7.2 to prevent confusion.
Will therefore close this off.

@ssddanbrown commented on GitHub (Nov 26, 2021): > Should I run all commands of the updates this way? Ideally, since php7.2 is not supported. Alternatively, if not in use anymore, you could look to remove php7.2 to prevent confusion. Will therefore close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2507