Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Error: Found unconstructed IntlDateFormatter" when authenticate (and "An unexpected error occurred." on non-authenticated navigation) #2065

Closed
aracnus opened this issue Jan 19, 2024 · 5 comments
Labels
feedback needed php compatibility php version support server support installation and configuration issues

Comments

@aracnus
Copy link

aracnus commented Jan 19, 2024

I'm using Shaarli on a Debian VPS, Apache 2.4.57-2 and PHP 8.1 (8.1.27-1+020231221.58+debian121.gbp3895b2).

I just upgrade Shaarli to version 0.13.0 and receive a "An unexpected error occurred." error on frontpage, with only one bookmark beeing shown. When I authenticate, error change to "Error: Found unconstructed IntlDateFormatter", with these details:

Found unconstructed IntlDateFormatter
/my_shaarli_location/application/Utils.php329
#0 /my_shaarli_location/application/Utils.php(329): IntlDateFormatter->setTimeZone()
#1 /my_shaarli_location/tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php(318): format_date()
#2 /my_shaarli_location/inc/rain.tpl.class.php(190): include('...')
#3 /my_shaarli_location/application/render/PageBuilder.php(253): RainTPL->draw()
#4 /my_shaarli_location/application/front/controller/visitor/ShaarliVisitorController.php(70): Shaarli\Render\PageBuilder->render()
#5 /my_shaarli_location/application/front/controller/visitor/BookmarkListController.php(123): Shaarli\Front\Controller\Visitor\ShaarliVisitorController->render()
#6 [internal function]: Shaarli\Front\Controller\Visitor\BookmarkListController->index()
#7 /my_shaarli_location/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func()
#8 /my_shaarli_location/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke()
#9 /my_shaarli_location/application/front/ShaarliMiddleware.php(55): Slim\Route->__invoke()
#10 [internal function]: Shaarli\Front\ShaarliMiddleware->__invoke()
#11 /my_shaarli_location/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array()
#12 [internal function]: Slim\DeferredCallable->__invoke()
#13 /my_shaarli_location/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func()
#14 /my_shaarli_location/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim\{closure}()
#15 /my_shaarli_location/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack()
#16 /my_shaarli_location/vendor/slim/slim/Slim/App.php(503): Slim\Route->run()
#17 /my_shaarli_location/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->__invoke()
#18 /my_shaarli_location/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack()
#19 /my_shaarli_location/vendor/slim/slim/Slim/App.php(297): Slim\App->process()
#20 /my_shaarli_location/index.php(202): Slim\App->run()
#21 {main}

("my_shaarli_location" is not my real folder)

Any clues on how to fix it?

@nodiscc nodiscc added php compatibility php version support server support installation and configuration issues labels Jan 20, 2024
@nodiscc
Copy link
Member

nodiscc commented Jan 20, 2024

Hi @aracnus
Where do your PHP packages come from (apt policy php8.1)? Because the current versions on Debian Stable are apache 2.4.57-2 and php 8.2.7-1~deb12u1 (this is the setup I use, by the way).

PHP8.1 is not available in Debian 12 repositories https://packages.debian.org/bookworm/php

@nodiscc
Copy link
Member

nodiscc commented Mar 10, 2024

Hi @aracnus, can you provide the info requested above?

@kcaran
Copy link

kcaran commented May 13, 2024

I'm using Centos 8, but I had the same issue and made this note to myself:

(2022-03-31 Added php-intl to install - didn't automatically add the module)
http://tutorialspots.com/php-how-to-install-intl-module-on-centos-4357.html

It looks like there is a php-intl package on Debian as well.

@nodiscc
Copy link
Member

nodiscc commented May 13, 2024

Hi @kcaran thanks for the additional info. The problem might be related to a missing PHP extension, in which make sure to install all the required extensions https://shaarli.readthedocs.io/en/master/Server-configuration.html#php. The requirement for php-intl has been around for longer than v0.13.0 though, so I'm not sure what exactly is going on on @aracnus's setup. I would try sticking to PHP packages provided by the distribution.

Feel free to reopen with more info.

@nodiscc nodiscc closed this as completed May 13, 2024
@nodiscc
Copy link
Member

nodiscc commented May 13, 2024

See #2085 for a possible solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback needed php compatibility php version support server support installation and configuration issues
Projects
None yet
Development

No branches or pull requests

3 participants