Azure / wordpress-linux-appservice

MIT License
96 stars 65 forks source link

Intl: is not installed, or has been disabled. #135

Closed arisniko1 closed 3 weeks ago

arisniko1 commented 4 months ago

Hello! I don't know if it's an issue per se but whatever I have tried I cannot install intl to my website. Pecl install can't build it, with apk add it does install it but the installation is not persistent when I have to restart the app. I follow every official and unofficial guide I have found but no persistence whatsoever.

samrueby commented 4 months ago

Persistance can be solved by adding the commands to install in the startup script.

arisniko1 commented 4 months ago

Hello! It doesn't work with a startup script either... I follow this guide: https://github.com/Azure/wordpress-linux-appservice/blob/main/WordPress/wordpress_adding_php_extensions.md among others I've tried and when the app restarts after step 7 the module is nowhere to be found...

samrueby commented 4 months ago

That guide doesn't mention the startup script. That guide takes a module and places it within /home/site, which is persisted between restarts. If it's not, then WEBSITES_ENABLE_APP_SERVICE_STORAGE should be set to true.

Instead, I recommend following this guide to use apk add in a startup script, which you mentioned works as you expect.

arisniko1 commented 4 months ago

I have checked and double-checked everything to no avail. I have managed to have it installed with the startup script on /home/dev/ every time it restarts but the website doesn't see it as enabled. It is just installed. Any advice?

dho79 commented 1 month ago

Hello I cant load extension intl in nginx/php-fpm stack php 8.3

Installation via /home/dev/startup.sh apk add icu-dev docker-php-ext-configure intl docker-php-ext-install intl docker-php-ext-enable intl /usr/sbin/nginx -s reload

php -i intl

Internationalization support => enabled ICU version => 74.1 ICU Data version => 74.1 ICU TZData version => 2023c ICU Unicode version => 15.1

Directive => Local Value => Master Value intl.default_locale => no value => no value intl.error_level => 0 => 0 intl.use_exceptions => Off => Off

added extension with PHP_INI_SCAN_DIR

in php-error log [12-Jun-2024 11:11:36 UTC] PHP Warning: PHP Startup: Unable to load dynamic library '/home/site/ext/intl.so' (tried: /home/site/ext/intl.so (Error loading shared library libicuio.so.74: No such file or directory (needed by /home/site/ext/intl.so)), /usr/local/lib/php/extensions/no-debug-non-zts-20230831//home/site/ext/intl.so.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20230831//home/site/ext/intl.so.so: No such file or directory)) in Unknown on line 0

==>not present in phpinfo from nginx

any idea?

ZubaeyrMSFT commented 3 weeks ago

Closing this as duplicate, as there is another recent thread.