Hey there!
So, I'm facing an issue with the Flarum instalation! After to run de composer create-project flarum/flarum .
and all dependecies are installed, when I try to acssess the public diretory, I getting the follow message: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2".
I was checking the log file and I found this error:
[2022-04-28 19:02:33] flarum.ERROR: ParseError: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /var/www/html/forum/vendor/symfony/filesystem/Filesystem.php:87
Stack trace:
#0 /var/www/html/forum/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#2 /var/www/html/forum/vendor/symfony/config/ResourceCheckerConfigCache.php(122): spl_autoload_call()
#3 /var/www/html/forum/vendor/symfony/translation/Translator.php(333): Symfony\Component\Config\ResourceCheckerConfigCache->write()
#4 /var/www/html/forum/vendor/symfony/translation/Translator.php(298): Symfony\Component\Translation\Translator->dumpCatalogue()
#5 /var/www/html/forum/vendor/symfony/config/ConfigCacheFactory.php(42): Symfony\Component\Translation\Translator->Symfony\Component\Translation\{closure}()
#6 /var/www/html/forum/vendor/symfony/translation/Translator.php(299): Symfony\Component\Config\ConfigCacheFactory->cache()
#7 /var/www/html/forum/vendor/symfony/translation/Translator.php(270): Symfony\Component\Translation\Translator->initializeCacheCatalogue()
#8 /var/www/html/forum/vendor/symfony/translation/Translator.php(241): Symfony\Component\Translation\Translator->loadCatalogue()
#9 /var/www/html/forum/vendor/flarum/core/src/Locale/Translator.php(44): Symfony\Component\Translation\Translator->getCatalogue()
#10 /var/www/html/forum/vendor/symfony/translation/Translator.php(207): Flarum\Locale\Translator->getCatalogue()
#11 /var/www/html/forum/vendor/flarum/core/src/Api/Serializer/GroupSerializer.php(65): Symfony\Component\Translation\Translator->trans()
#12 /var/www/html/forum/vendor/flarum/core/src/Api/Serializer/GroupSerializer.php(51): Flarum\Api\Serializer\GroupSerializer->translateGroupName()
#13 /var/www/html/forum/vendor/flarum/core/src/Api/Serializer/AbstractSerializer.php(88): Flarum\Api\Serializer\GroupSerializer->getDefaultAttributes()
#14 /var/www/html/forum/vendor/tobscure/json-api/src/Resource.php(169): Flarum\Api\Serializer\AbstractSerializer->getAttributes()
#15 /var/www/html/forum/vendor/tobscure/json-api/src/Resource.php(75): Tobscure\JsonApi\Resource->getAttributes()
#16 /var/www/html/forum/vendor/tobscure/json-api/src/Document.php(187): Tobscure\JsonApi\Resource->toArray()
#17 [internal function]: Tobscure\JsonApi\Document->Tobscure\JsonApi\{closure}()
#18 /var/www/html/forum/vendor/tobscure/json-api/src/Document.php(186): array_map()
#19 /var/www/html/forum/vendor/tobscure/json-api/src/Document.php(224): Tobscure\JsonApi\Document->toArray()
#20 /var/www/html/forum/vendor/flarum/core/src/Api/JsonApiResponse.php(27): Tobscure\JsonApi\Document->jsonSerialize()
#21 /var/www/html/forum/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(134): Flarum\Api\JsonApiResponse->__construct()
#22 /var/www/html/forum/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Api\Controller\AbstractSerializeController->handle()
#23 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#24 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ExecuteRoute->process()
#25 /var/www/html/forum/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle()
#26 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Api\Middleware\ThrottleApi->process()
#27 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(67): Laminas\Stratigility\Next->handle()
#28 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ResolveRoute->process()
#29 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle()
#30 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\SetLocale->process()
#31 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#32 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\HandleErrors->process()
#33 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(76): Laminas\Stratigility\Next->handle()
#34 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(65): Laminas\Stratigility\MiddlewarePipe->process()
#35 /var/www/html/forum/vendor/flarum/core/src/Api/Client.php(145): Laminas\Stratigility\MiddlewarePipe->handle()
#36 /var/www/html/forum/vendor/flarum/core/src/Api/Client.php(95): Flarum\Api\Client->send()
#37 /var/www/html/forum/vendor/flarum/core/src/Frontend/Frontend.php(69): Flarum\Api\Client->get()
#38 /var/www/html/forum/vendor/flarum/core/src/Frontend/Frontend.php(50): Flarum\Frontend\Frontend->getForumDocument()
#39 /var/www/html/forum/vendor/flarum/core/src/Frontend/Controller.php(32): Flarum\Frontend\Frontend->document()
#40 /var/www/html/forum/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Frontend\Controller->handle()
#41 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#42 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ExecuteRoute->process()
#43 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/ContentTypeOptionsHeader.php(21): Laminas\Stratigility\Next->handle()
#44 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ContentTypeOptionsHeader->process()
#45 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/ReferrerPolicyHeader.php(30): Laminas\Stratigility\Next->handle()
#46 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ReferrerPolicyHeader->process()
#47 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/FlarumPromotionHeader.php(30): Laminas\Stratigility\Next->handle()
#48 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\FlarumPromotionHeader->process()
#49 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/ShareErrorsFromSession.php(57): Laminas\Stratigility\Next->handle()
#50 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ShareErrorsFromSession->process()
#51 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(36): Laminas\Stratigility\Next->handle()
#52 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\CheckCsrfToken->process()
#53 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(67): Laminas\Stratigility\Next->handle()
#54 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ResolveRoute->process()
#55 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle()
#56 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\SetLocale->process()
#57 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle()
#58 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\AuthenticateWithSession->process()
#59 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle()
#60 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\RememberFromCookie->process()
#61 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()
#62 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\StartSession->process()
#63 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/CollectGarbage.php(46): Laminas\Stratigility\Next->handle()
#64 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\CollectGarbage->process()
#65 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()
#66 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ParseJsonBody->process()
#67 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#68 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\HandleErrors->process()
#69 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle()
#70 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\InjectActorReference->process()
#71 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(76): Laminas\Stratigility\Next->handle()
#72 /var/www/html/forum/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#73 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Middlewares\RequestHandler->process()
#74 /var/www/html/forum/vendor/middlewares/base-path-router/src/BasePathRouter.php(101): Laminas\Stratigility\Next->handle()
#75 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Middlewares\BasePathRouter->process()
#76 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle()
#77 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Laminas\Stratigility\Middleware\OriginalMessages->process()
#78 /var/www/html/forum/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle()
#79 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Middlewares\BasePath->process()
#80 /var/www/html/forum/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle()
#81 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ProcessIp->process()
#82 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(76): Laminas\Stratigility\Next->handle()
#83 /var/www/html/forum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(65): Laminas\Stratigility\MiddlewarePipe->process()
#84 /var/www/html/forum/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle()
#85 /var/www/html/forum/vendor/flarum/core/src/Http/Server.php(44): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#86 /var/www/html/forum/public/index.php(26): Flarum\Http\Server->listen()
#87 {main}
and also I did the installation with the --ignore-platform-reqs
as well, the error reported above was solved, but was getting the other error:
Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.
=> core.ref.all_discussions
I guess is not better approach install the dependencies with --ignore-platform-reqs
, well, I reverted it.
Current PHP version in my cloud server
PHP 8.1.5 (cli) (built: Apr 21 2022 10:14:45) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.5, Copyright (c) Zend Technologies
with Zend OPcache v8.1.5, Copyright (c), by Zend Technologies
How I can fix it?
thx for your time and helper 🙂