Update BookStack on RackCorp
- For RackCorp Web Hosting Platform Only -
1. Login to the hosted website shell using a local user, NOT a super user. the PHP version gets misdetected as superuser
2. cd /httpdocs/Bookstack
3. ls to verify folder contents. note artisan, composer.*, composer.phar
-bash-4.4$ ls -l
total 2900
-rw-r--r-- 1 12425 12425 1186 Nov 7 07:04 LICENSE
drwxr-xr-x 20 12425 12425 4096 Dec 20 06:38 app
-rwxr-xr-x 1 12425 12425 1685 Nov 7 07:04 artisan
drwxr-xr-x 3 12425 12425 4096 Dec 20 06:38 bootstrap
-rw-r--r-- 1 12425 12425 57721 Nov 7 07:06 composer-setup.php
-rw-r--r-- 1 12425 12425 3353 Dec 20 06:38 composer.json
-rw-r--r-- 1 12425 12425 397702 Dec 20 06:38 composer.lock
-rw-r--r-- 1 12425 12425 2286233 Nov 7 07:11 composer.phar
-rw-r--r-- 1 12425 12425 200 Nov 7 07:04 crowdin.yml
drwxr-xr-x 5 12425 12425 4096 Dec 20 06:38 database
drwxr-xr-x 5 12425 12425 4096 Nov 7 07:04 dev
-rw-r--r-- 1 12425 12425 1292 Nov 7 07:04 docker-compose.yml
-rw-r--r-- 1 12425 12425 112666 Dec 20 06:38 package-lock.json
-rw-r--r-- 1 12425 12425 1420 Dec 20 06:38 package.json
-rw-r--r-- 1 12425 12425 452 Dec 20 06:38 phpstan.neon.dist
-rw-r--r-- 1 12425 12425 2610 Dec 20 06:38 phpunit.xml
drwxr-xr-x 5 12425 12425 4096 Dec 20 06:38 public
-rw-r--r-- 1 12425 12425 14715 Dec 20 06:38 readme.md
drwxr-xr-x 7 12425 12425 4096 Nov 7 07:04 resources
drwxr-xr-x 2 12425 12425 4096 Dec 20 06:38 routes
-rw-r--r-- 1 12425 12425 552 Nov 7 07:04 server.php
drwxr-xr-x 8 12425 12425 4096 Dec 20 06:38 storage
drwxr-xr-x 13 12425 12425 4096 Dec 20 06:38 tests
drwxr-xr-x 2 12425 12425 4096 Nov 7 07:04 themes
drwxr-xr-x 43 12425 12425 4096 Nov 7 07:11 vendor
-rw-r--r-- 1 12425 12425 9 Dec 20 06:38 version
4. git pull origin release && php composer.phar install --no-dev && php artisan migrate
this is different to the web instructions, we add the php runtime and .phar due to the environment, otherwise command wont work
5. should see GIT run and do its changes, and then composer run and do its package installs. Any errors mean the command line is wrong for the environment, or the web documentation command line was used.
remote: Total 1799 (delta 1140), reused 1153 (delta 1137), pack-reused 635
Receiving objects: 100% (1799/1799), 634.53 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1523/1523), completed with 453 local objects.
From https://github.com/BookStackApp/BookStack
* branch release -> FETCH_HEAD
01cdbdb..009212a release -> origin/release
Updating 01cdbdb..009212a
Fast-forward
.env.example.complete | 7 +-
.github/translators.txt | 10 +
.github/workflows/phpstan.yml | 41 +
.github/workflows/phpunit.yml | 8 +-
.github/workflows/test-migrations.yml | 6 +-
.gitignore | 3 +-
app/Actions/Activity.php | 2 +-
app/Actions/ActivityService.php | 13 +-
app/Actions/Comment.php | 2 +
app/Actions/CommentRepo.php | 5 +-
app/Actions/Tag.php | 9 +
app/Actions/TagRepo.php | 53 +-
app/Api/ApiDocsGenerator.php | 21 +-
app/Api/ApiToken.php | 2 +-
app/Api/ApiTokenGuard.php | 4 +-
app/Auth/Access/ExternalBaseUserProvider.php | 19 +-
app/Auth/Access/Guards/LdapSessionGuard.php | 2 +-
app/Auth/Access/Ldap.php | 19 +-
app/Auth/Access/LdapService.php | 2 +-
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 16 installs, 33 updates, 6 removals
Cannot create cache directory /home/httpd/vhostmounts/local/2425/.composer/cache/files/, or directory is not writable. Proceeding without cache
- Downloading composer/package-versions-deprecated (1.11.99.4)
- Downloading voku/portable-ascii (1.5.6)
- Downloading phpoption/phpoption (1.8.1)
- Downloading graham-campbell/result-type (v1.0.4)
Package manifest generated successfully.
58 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php artisan cache:clear
Application cache cleared!
> @php artisan view:clear
Compiled views cleared!
**************************************
* Application In Production! *
**************************************
Do you really wish to run this command? (yes/no) [no]:
> yes
Nothing to migrate.
6. If the above commands generate an error an do no execute with a result similar to the example above, run the following commands to diagnoise the issue.
-bash-4.4$ php composer.phar diagnose
Checking composer.json: WARNING
require.ssddanbrown/symfony-mailer : exact version constraints (6.4.x-dev) should be avoided if the package follows semantic versioning
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys: FAIL
Missing pubkey for tags verification
Missing pubkey for dev verification
Run composer self-update --update-keys to set them up
Checking composer version: You are not running the latest stable version, run `composer self-update` to update (2.1.11 => 2.8.4)
Composer version: 2.1.11
PHP version: 8.1.0 - Package overridden via config.platform, actual: 8.1.19
PHP binary path: /usr/local/PACKAGES/php-8.1.19-std/bin/php
OpenSSL version: OpenSSL 1.1.1k FIPS 25 Mar 2021
cURL version: 7.61.1 libz 1.2.11 ssl OpenSSL/1.1.1k
zip: extension present, unzip present, 7-Zip not available
Typically the PHP composer is out of date as shown
-bash-4.4$ php composer.phar self-update
Upgrading to version 2.8.4 (stable channel).
Use composer self-update --rollback to return to version 2.1.11
Re-run the diagnostic and it should pass
-bash-4.4$ php composer.phar diagnose
Checking composer.json: WARNING
require.ssddanbrown/symfony-mailer : exact version constraints (6.4.x-dev) should be avoided if the package follows semantic versioning
Checking composer.lock: OK
Checking platform settings: OK
Checking git settings: WARNING
Your git version (2.9.5) is too old and possibly will cause issues. Please upgrade to git 2.24 or above
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking Composer version: OK
Checking Composer and its dependencies for vulnerabilities: OK
Composer version: 2.8.4
PHP version: 8.1.0 - Package overridden via config.platform, actual: 8.1.19
PHP binary path: /usr/local/PACKAGES/php-8.1.19-std/bin/php
OpenSSL version: OpenSSL 1.1.1k FIPS 25 Mar 2021
curl version: 7.61.1 libz 1.2.11 ssl OpenSSL/1.1.1k
zip: extension present, unzip present, 7-Zip not available
Re-run the installer as per step 4 , you should see it download and install new packages without error
-bash-4.4$ php composer.phar install --no-dev
> @php -r "!file_exists('bootstrap/cache/services.php') || @unlink('bootstrap/cache/services.php');"
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 6 installs, 84 updates, 6 removals
- Downloading aws/aws-crt-php (v1.2.7)
- Downloading dasprid/enum (1.0.6)
- Downloading bacon/bacon-qr-code (v3.0.1)
- Downloading psr/log (3.0.2)
- Downloading doctrine/event-manager (2.0.1)
- Downloading doctrine/deprecations (1.1.4)
- Downloading doctrine/dbal (3.9.3)
- Downloading doctrine/lexer (3.0.1)
- Downloading masterminds/html5 (2.9.0)
- Downloading symfony/polyfill-mbstring (v1.31.0)
- Downloading sabberworm/php-css-parser (v8.7.0)
- Downloading dompdf/php-svg-lib (1.0.0)
- Downloading dompdf/php-font-lib (1.0.1)
- Downloading dompdf/dompdf (v3.0.2)
- Downloading symfony/polyfill-ctype (v1.31.0)
- Downloading dragonmantank/cron-expression (v3.4.0)
- Downloading symfony/polyfill-php83 (v1.31.0)
- Downloading symfony/deprecation-contracts (v3.5.1)
- Downloading symfony/http-foundation (v6.4.16)
- Downloading guzzlehttp/promises (2.0.4)
- Downloading symfony/polyfill-php80 (v1.31.0)
- Downloading intervention/gif (4.2.0)
- Downloading intervention/image (3.10.2)
- Downloading symfony/process (v6.4.15)
- Downloading knplabs/knp-snappy (v1.5.0)
- Downloading symfony/polyfill-intl-normalizer (v1.31.0)
- Downloading symfony/polyfill-intl-grapheme (v1.31.0)
- Downloading symfony/string (v6.4.15)
- Downloading symfony/service-contracts (v3.5.1)
- Downloading symfony/console (v6.4.17)
- Downloading voku/portable-ascii (2.0.3)
- Downloading phpoption/phpoption (1.9.3)
- Downloading graham-campbell/result-type (v1.1.3)
- Downloading vlucas/phpdotenv (v5.6.1)
- Downloading symfony/css-selector (v6.4.13)
- Downloading tijsverkoyen/css-to-inline-styles (v2.3.0)
- Downloading symfony/var-dumper (v6.4.15)
- Downloading symfony/polyfill-uuid (v1.31.0)
- Downloading symfony/uid (v6.4.13)
- Downloading symfony/routing (v6.4.16)
- Downloading symfony/polyfill-intl-idn (v1.31.0)
- Downloading symfony/mime (v6.4.17)
- Downloading symfony/event-dispatcher-contracts (v3.5.1)
- Downloading symfony/event-dispatcher (v6.4.13)
- Downloading egulias/email-validator (4.0.3)
- Downloading ssddanbrown/symfony-mailer (6.4.x-dev 0497d6e)
- Downloading symfony/error-handler (v6.4.17)
- Downloading symfony/http-kernel (v6.4.17)
- Downloading symfony/finder (v6.4.17)
- Downloading ramsey/collection (2.0.0)
- Downloading brick/math (0.12.1)
- Downloading ramsey/uuid (4.7.6)
- Downloading nunomaduro/termwind (v1.17.0)
- Downloading symfony/translation-contracts (v3.5.1)
- Downloading symfony/translation (v6.4.13)
- Downloading nesbot/carbon (2.72.6)
- Downloading monolog/monolog (3.8.1)
- Downloading league/mime-type-detection (1.16.0)
- Downloading league/flysystem (3.29.1)
- Downloading league/flysystem-local (3.29.0)
- Downloading nette/utils (v4.0.5)
- Downloading nette/schema (v1.3.2)
- Downloading dflydev/dot-access-data (v3.0.3)
- Downloading league/commonmark (2.6.1)
- Downloading laravel/serializable-closure (v1.3.7)
- Downloading laravel/prompts (v0.1.25)
- Downloading laravel/framework (v10.48.25)
- Downloading paragonie/constant_time_encoding (v3.0.0)
- Downloading phpseclib/phpseclib (3.0.43)
- Downloading psr/http-factory (1.1.0)
- Downloading guzzlehttp/psr7 (2.7.0)
- Downloading guzzlehttp/guzzle (7.9.2)
- Downloading league/oauth1-client (v1.11.0)
- Downloading firebase/php-jwt (v6.10.2)
- Downloading laravel/socialite (v5.16.1)
- Downloading nikic/php-parser (v5.4.0)
- Downloading psy/psysh (v0.12.7)
- Downloading laravel/tinker (v2.10.0)
- Downloading mtdowling/jmespath.php (2.8.0)
- Downloading aws/aws-sdk-php (3.336.8)
- Downloading league/flysystem-aws-s3-v3 (3.29.0)
- Downloading league/oauth2-client (2.8.0)
- Downloading robrichards/xmlseclibs (3.1.3)
- Downloading onelogin/php-saml (4.2.0)
- Downloading pragmarx/google2fa (v8.0.3)
- Downloading predis/predis (v2.3.0)
- Downloading socialiteproviders/manager (v4.8.0)
- Downloading socialiteproviders/microsoft-azure (5.2.0)
- Downloading socialiteproviders/twitch (5.4.0)
- Downloading ssddanbrown/htmldiff (v1.0.4)
- Removing symfony/polyfill-php81 (v1.29.0)
- Removing symfony/polyfill-php72 (v1.29.0)
- Removing phenx/php-svg-lib (0.5.2)
- Removing phenx/php-font-lib (0.5.6)
- Removing barryvdh/laravel-snappy (v1.0.2)
- Removing barryvdh/laravel-dompdf (v2.0.1)
- Upgrading aws/aws-crt-php (v1.2.4 => v1.2.7): Extracting archive
- Upgrading dasprid/enum (1.0.5 => 1.0.6): Extracting archive
- Upgrading bacon/bacon-qr-code (2.0.8 => v3.0.1): Extracting archive
- Upgrading psr/log (3.0.0 => 3.0.2): Extracting archive
- Upgrading doctrine/event-manager (1.2.0 => 2.0.1): Extracting archive
- Upgrading doctrine/deprecations (1.1.3 => 1.1.4): Extracting archive
- Upgrading doctrine/dbal (3.8.2 => 3.9.3): Extracting archive
- Upgrading doctrine/lexer (2.1.1 => 3.0.1): Extracting archive
- Upgrading masterminds/html5 (2.8.1 => 2.9.0): Extracting archive
- Upgrading symfony/polyfill-mbstring (v1.29.0 => v1.31.0): Extracting archive
- Upgrading sabberworm/php-css-parser (v8.5.1 => v8.7.0): Extracting archive
- Installing dompdf/php-svg-lib (1.0.0): Extracting archive
- Installing dompdf/php-font-lib (1.0.1): Extracting archive
- Upgrading dompdf/dompdf (v2.0.4 => v3.0.2): Extracting archive
- Upgrading symfony/polyfill-ctype (v1.29.0 => v1.31.0): Extracting archive
- Upgrading dragonmantank/cron-expression (v3.3.3 => v3.4.0): Extracting archive
- Installing symfony/polyfill-php83 (v1.31.0): Extracting archive
- Upgrading symfony/deprecation-contracts (v3.0.2 => v3.5.1): Extracting archive
- Upgrading symfony/http-foundation (v6.0.20 => v6.4.16): Extracting archive
- Upgrading guzzlehttp/promises (2.0.2 => 2.0.4): Extracting archive
- Upgrading symfony/polyfill-php80 (v1.29.0 => v1.31.0): Extracting archive
- Installing intervention/gif (4.2.0): Extracting archive
- Upgrading intervention/image (2.7.2 => 3.10.2): Extracting archive
- Upgrading symfony/process (v6.0.19 => v6.4.15): Extracting archive
- Upgrading knplabs/knp-snappy (v1.4.4 => v1.5.0): Extracting archive
- Upgrading symfony/polyfill-intl-normalizer (v1.29.0 => v1.31.0): Extracting archive
- Upgrading symfony/polyfill-intl-grapheme (v1.29.0 => v1.31.0): Extracting archive
- Upgrading symfony/string (v6.0.19 => v6.4.15): Extracting archive
- Upgrading symfony/service-contracts (v3.0.2 => v3.5.1): Extracting archive
- Upgrading symfony/console (v6.0.19 => v6.4.17): Extracting archive
- Upgrading voku/portable-ascii (2.0.1 => 2.0.3): Extracting archive
- Upgrading phpoption/phpoption (1.9.2 => 1.9.3): Extracting archive
- Upgrading graham-campbell/result-type (v1.1.2 => v1.1.3): Extracting archive
- Upgrading vlucas/phpdotenv (v5.6.0 => v5.6.1): Extracting archive
- Upgrading symfony/css-selector (v6.0.19 => v6.4.13): Extracting archive
- Upgrading tijsverkoyen/css-to-inline-styles (v2.2.7 => v2.3.0): Extracting archive
- Upgrading symfony/var-dumper (v6.0.19 => v6.4.15): Extracting archive
- Upgrading symfony/polyfill-uuid (v1.29.0 => v1.31.0): Extracting archive
- Upgrading symfony/uid (v6.0.19 => v6.4.13): Extracting archive
- Upgrading symfony/routing (v6.0.19 => v6.4.16): Extracting archive
- Upgrading symfony/polyfill-intl-idn (v1.29.0 => v1.31.0): Extracting archive
- Upgrading symfony/mime (v6.0.19 => v6.4.17): Extracting archive
- Upgrading symfony/event-dispatcher-contracts (v3.0.2 => v3.5.1): Extracting archive
- Upgrading symfony/event-dispatcher (v6.0.19 => v6.4.13): Extracting archive
- Upgrading egulias/email-validator (3.2.6 => 4.0.3): Extracting archive
- Upgrading ssddanbrown/symfony-mailer (6.0.x-dev 2219dcd => 6.4.x-dev 0497d6e): Extracting archive
- Upgrading symfony/error-handler (v6.0.19 => v6.4.17): Extracting archive
- Upgrading symfony/http-kernel (v6.0.20 => v6.4.17): Extracting archive
- Upgrading symfony/finder (v6.0.19 => v6.4.17): Extracting archive
- Upgrading ramsey/collection (1.3.0 => 2.0.0): Extracting archive
- Upgrading brick/math (0.11.0 => 0.12.1): Extracting archive
- Upgrading ramsey/uuid (4.7.5 => 4.7.6): Extracting archive
- Upgrading nunomaduro/termwind (v1.15.1 => v1.17.0): Extracting archive
- Upgrading symfony/translation-contracts (v3.0.2 => v3.5.1): Extracting archive
- Upgrading symfony/translation (v6.0.19 => v6.4.13): Extracting archive
- Upgrading nesbot/carbon (2.72.3 => 2.72.6): Extracting archive
- Upgrading monolog/monolog (2.9.2 => 3.8.1): Extracting archive
- Upgrading league/mime-type-detection (1.15.0 => 1.16.0): Extracting archive
- Upgrading league/flysystem (3.24.0 => 3.29.1): Extracting archive
- Upgrading league/flysystem-local (3.23.1 => 3.29.0): Extracting archive
- Upgrading nette/utils (v4.0.4 => v4.0.5): Extracting archive
- Upgrading nette/schema (v1.2.5 => v1.3.2): Extracting archive
- Upgrading dflydev/dot-access-data (v3.0.2 => v3.0.3): Extracting archive
- Upgrading league/commonmark (2.4.2 => 2.6.1): Extracting archive
- Upgrading laravel/serializable-closure (v1.3.3 => v1.3.7): Extracting archive
- Installing laravel/prompts (v0.1.25): Extracting archive
- Upgrading laravel/framework (v9.52.16 => v10.48.25): Extracting archive
- Upgrading paragonie/constant_time_encoding (v2.6.3 => v3.0.0): Extracting archive
- Upgrading phpseclib/phpseclib (3.0.36 => 3.0.43): Extracting archive
- Upgrading psr/http-factory (1.0.2 => 1.1.0): Extracting archive
- Upgrading guzzlehttp/psr7 (2.6.2 => 2.7.0): Extracting archive
- Upgrading guzzlehttp/guzzle (7.8.1 => 7.9.2): Extracting archive
- Upgrading league/oauth1-client (v1.10.1 => v1.11.0): Extracting archive
- Installing firebase/php-jwt (v6.10.2): Extracting archive
- Upgrading laravel/socialite (v5.12.1 => v5.16.1): Extracting archive
- Upgrading nikic/php-parser (v5.0.1 => v5.4.0): Extracting archive
- Upgrading psy/psysh (v0.12.0 => v0.12.7): Extracting archive
- Upgrading laravel/tinker (v2.9.0 => v2.10.0): Extracting archive
- Upgrading mtdowling/jmespath.php (2.7.0 => 2.8.0): Extracting archive
- Upgrading aws/aws-sdk-php (3.300.6 => 3.336.8): Extracting archive
- Upgrading league/flysystem-aws-s3-v3 (3.24.0 => 3.29.0): Extracting archive
- Upgrading league/oauth2-client (2.7.0 => 2.8.0): Extracting archive
- Upgrading robrichards/xmlseclibs (3.1.1 => 3.1.3): Extracting archive
- Upgrading onelogin/php-saml (4.1.0 => 4.2.0): Extracting archive
- Upgrading pragmarx/google2fa (v8.0.1 => v8.0.3): Extracting archive
- Upgrading predis/predis (v2.2.2 => v2.3.0): Extracting archive
- Upgrading socialiteproviders/manager (v4.5.1 => v4.8.0): Extracting archive
- Upgrading socialiteproviders/microsoft-azure (5.1.0 => 5.2.0): Extracting archive
- Upgrading socialiteproviders/twitch (5.3.1 => 5.4.0): Extracting archive
- Upgrading ssddanbrown/htmldiff (v1.0.2 => v1.0.4): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
INFO Discovering packages.
laravel/socialite ........................................................................................................................... DONE
laravel/tinker .............................................................................................................................. DONE
nesbot/carbon ............................................................................................................................... DONE
nunomaduro/termwind ......................................................................................................................... DONE
socialiteproviders/manager .................................................................................................................. DONE
59 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php artisan cache:clear
INFO Application cache cleared successfully.
> @php artisan view:clear
INFO Compiled views cleared successfully.
migrate the database as per step 4 if you have not already run it above.
7. The install ends with caches being cleared, lets run them again according to the instructions
-bash-4.4$ php artisan cache:clear
Application cache cleared!
-bash-4.4$ php artisan config:clear
Configuration cache cleared!
-bash-4.4$ php artisan view:clear
Compiled views cleared!
-bash-4.4$
7.8. Verify version in application