PHP7 intl not loaded anymore

Hi.

I have PHP7 installed on my system. Somehow, intl is not loaded anymore.

When I run:

php7 --ini

PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/lib/php7/modules/intl (/usr/lib/php7/modules/intl: cannot open shared object file: No such file or directory), /usr/lib/php7/modules/intl.so (libicuio.so.72: cannot open shared object file: No such file or directory)) in Unknown on line 0
Configuration File (php.ini) Path: /etc/php7
Loaded Configuration File:         /etc/php7/php.ini
Scan for additional .ini files in: /etc/php7/conf.d
Additional .ini files parsed:      /etc/php7/conf.d/apcu.ini,
/etc/php7/conf.d/igbinary.ini,
/etc/php7/conf.d/imagick.ini,
/etc/php7/conf.d/memcache.ini,
/etc/php7/conf.d/memcached.ini,
/etc/php7/conf.d/redis.ini

Indeed, intl.so is not in /usr/lib/php7/modules/. (It is however in /usr/lib/php/modules/)

I have enable intl in /etc/php7/php.ini.

Everything was fine last time I used php7, a couple of months ago.

What’s happening?

And it was an AUR package, right?

Since it is a AUR package, your would need php70-intl aswell.

Thanks for your answer.

And it was an AUR package, right?

Yes.

Since it is a AUR package, your would need php70-intl aswell.

This installs me php70.

However, I’m using the php7 package which runs php7.4.

Then replace it with 74 instead of 70. Shouldn’t be that difficult to use the package search function, or?

Hi and welcome to the Forum :+1:


You could perhaps use a symbolic link from the old location to the new location of that file…
Anyhow AUR packages are USER-Made for ArchLinux, they can but are not meant for usage in Manjaro…

What php7 package? There isn’t one in the AUR or the normal package repositories.

If you use php74, then you need php74-intl. If that is installed, you will most likely need to rebuild it. The relevant part of the error message is:

libicuio.so.72: cannot open shared object file: No such file or directory

This means that /usr/lib/php7/modules/intl.so wants to use a shared library (libicuio.so.72) that no longer exists. So most likely the icu package has been updated since php74-intl was last built.

@pobrn that was it, thanks!

What php7 package? There isn’t one in the AUR or the normal package repositories.

Can’t tell you more precisely.

Indeed the icu package has been updated. I completely switched to the php74 package and reinstalled php74-intl.

With a freshly built package, the error was gone.

Anyhow AUR packages are USER-Made for ArchLinux, they can but are not meant for usage in Manjaro…

Being the newbie that I am, I didn’t know that. I will remember this, thanks!

php7 is EOL - use php8 instead

thanks for the advice, must say that I’ve thought about it, but it’s a big project and the client doesn’t have the money for a safe migration…

Unfortunately it’s not that simple when you have clients who don’t want to pay for the work to do that. Also doesn’t help that Wordpress still supports PHP 7.4 and their PHP 8.x support is officially “beta”…

Who’s support is beta?

https://www.php.net/downloads

  • php 8.3 is beta
  • php 8.2 is current stable
  • php 8.1 is old stable
  • php 8.0 is old stable
 $ pamac info php
Name                  : php
Version               : 8.2.8-1
Description           : A general-purpose scripting language that is especially suited to web development
URL                   : https://www.php.net/
Licenses              : PHP
Repository            : extra
Installed Size        : 28,1 MB
Groups                : --
Depends On            : libxml2 curl libzip pcre2 argon2 oniguruma
Optional Dependencies : --
Provides              : php-interpreter=8.2 php-intl=8.2.8
Replaces              : php-intl
Conflicts With        : php-intl
Packager              : Pierre Schmitz <pierre@archlinux.org>
Build Date            : ons 05 jul 2023 20:47:24 CEST
Validated By          : MD5 Sum  SHA-256 Sum  Signature

And you have the option of using the php-legacy package-set which is based on php 8.1

 $ pamac info php-legacy
Name                  : php-legacy
Version               : 8.1.21-1
Description           : A general-purpose scripting language that is especially suited to web development
URL                   : https://www.php.net/
Licenses              : PHP
Repository            : extra
Installed Size        : 25,7 MB
Groups                : --
Depends On            : libxml2 curl libzip pcre2 argon2 oniguruma gdbm
Optional Dependencies : --
Provides              : php-interpreter=8.1 php-legacy-intl=8.1.21
Replaces              : php-legacy-intl
Conflicts With        : php-legacy-intl
Packager              : Pierre Schmitz <pierre@archlinux.org>
Build Date            : ons 05 jul 2023 20:53:48 CEST
Validated By          : MD5 Sum  SHA-256 Sum  Signature

Wordpress (which depending on which statistics you believe is used by 40-50% of all websites and 25-30% of the top 1m).

I see.

EOL environments are best run in a container or a vm.

I had to do something similar for an old vb 6 app that needed urgent changes in order to be used after switching to a new ERP system.

I had to run a Windows XP virtual machine to be able to make the necessary changes.

Clients have no choice when software they used is EOL, they either upgrade or stay in the stoneage.
It’s your choice as a developer if you want to support outdated code while making changes, just say upgrade or no deal simple…
They too know they HAVE to upgrade someday anyhow, so anyday is good enough to do so…

Disclaimer: Yes i hate arguments like the one i quoted…

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.