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 PHP You are using a fallback implementation of the intl extension. #10655

Closed
OliverPifferi opened this issue Aug 12, 2018 · 21 comments
Closed
Labels

Comments

@OliverPifferi
Copy link

Logfile-Error after updating to 14.0 Beta 3, logs each second:

Error PHP You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18

bildschirmfoto 2018-08-12 um 09 17 29

@OliverPifferi
Copy link
Author

OliverPifferi commented Aug 12, 2018

Did install php-intl extension, restarted Apache. Got it, error gone!

@OliverPifferi
Copy link
Author

Closed.

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #6784 (Php error?), #5808 (ERROR: PHP imap extension is not installed), #8740 (PHP errors (libpng)), #285 (PHP error in logfile), and #7090 (Continous PHP errors: inet_ntop() and inet_pton()).

@yan12125
Copy link
Contributor

yan12125 commented Sep 1, 2018

Did install php-int extension, restarted Apache. Got it, error gone!

A typo? I installed php-intl instead.

@OliverPifferi
Copy link
Author

Yeah, „intl“ is correct. Just edited it - thanks for the comment!

@wiwie
Copy link

wiwie commented Sep 13, 2018

In my case:

sudo apt install php7.2-intl
sudo systemctl restart php7.2-fpm.service

@langzixdj
Copy link

In my case:

sudo apt install php7.2-intl
sudo systemctl restart php7.2-fpm.service

thx, problem solved.

@sarumagar
Copy link

I'm new to programming. How do I install the php-intl extension? I use cpanel. Thanks in advance.

@leo9800
Copy link

leo9800 commented Nov 5, 2018

Did install php-intl extension, restarted Apache. Got it, error gone!

It works w/ nextcloud 14.0.3

Thx.

@ghost
Copy link

ghost commented Nov 13, 2018

Using Arch. php-intl was already installed, and turned on in php.ini, but problem still exists. Restarted nginx.

Also why is this logged every second?

@kesselb
Copy link
Contributor

kesselb commented Nov 13, 2018

@diederickdevries Please use help.nextcloud.com for configuration issues. Most people use nginx with php fpm. I guess you should restart fpm as well to load new php modules.

@ghost
Copy link

ghost commented Nov 13, 2018

@diederickdevries Please use help.nextcloud.com for configuration issues. Most people use nginx with php from. I guess you should restart fpm as well to load new php modules.

Yes, that was it. Thanks!

@de4niih
Copy link

de4niih commented Feb 9, 2019

Hey Guys, I still see this messages even php-intl is installed.

sudo -u WEBUSER /opt/php-7.3.2/bin/php occ

The current PHP memory limit is below the recommended value of 512MB.
Nextcloud 15.0.4

I compiled php 7.3.2 from source with:

Configure Command =>  './configure'  '--prefix=/opt/php-7.3.2' '--with-pdo-pgsql' '--with-zlib-dir' '--with-freetype-dir' '--enable-mbstring' '--with-libxml-dir=/usr' '--enable-soap' '--enable-calendar' '--with-curl' '--with-gd' '--with-pgsql' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-zlib' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-pcntl' '--enable-mbregex' '--enable-exif' '--enable-bcmath' '--with-mhash' '--enable-zip' '--with-pcre-regex' '--with-pdo-mysql' '--with-mysqli' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-openssl' '--with-fpm-user=www-data' '--with-fpm-group=www-data' '--with-libdir=/lib/x86_64-linux-gnu' '--enable-ftp' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-gettext' '--with-xmlrpc' '--with-xsl' '--enable-opcache' '--enable-fpm' '--enable-intl'

php -v

/opt/php-7.3.2/bin/php -v
PHP 7.3.2 (cli) (built: Feb  9 2019 22:48:42) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.2, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.3.2, Copyright (c) 2002-2018, by ionCube Ltd.
    with Zend OPcache v7.3.2, Copyright (c) 1999-2018, by Zend Technologies

php -m

/opt/php-7.3.2/bin/php -m
[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
geoip
gettext
hash
iconv
imagick
imap
intl
ionCube Loader
json
libxml
mbstring
memcached
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
redis
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
ssh2
standard
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured)

php -i

/opt/php-7.3.2/bin/php -i | grep Internationalization -A5
Internationalization support => enabled
ICU version => 60.2
ICU Data version => 60.2
ICU TZData version => 2017c
ICU Unicode version => 10.0

But I am still seeing the error messages popping up all the time.

You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/path/to/docroot/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18

@endo64
Copy link

endo64 commented Mar 4, 2019

@carloscomputer @de4niih Your Apache might be using another php.ini where the extension might not be enabled.

@de4niih
Copy link

de4niih commented Mar 4, 2019

@carloscomputer @de4niih Your Apache might be using another php.ini where the extension might not be enabled.

That's quite a interesting approach - but I am using "event" mpm as eventhandler - therefore apache is passing requests over to the php socket created for the site. Apache itself is not chewing the php gum.

Placing a <?php phpinfo(); ?> in a info.php file shows the very same version and available php extentions in the browser.

@asca69
Copy link

asca69 commented Mar 14, 2019

Hi ;

Like de4niih, I installed php-intl and I still have this problem. I restart my server after so it's quite confusing.

Tks for any help

@Ablinne
Copy link

Ablinne commented Mar 22, 2019

I have the same problem with nextcloud 15.0.5. intl extension is installed and active (as confirmed py phpinfo()), the message persists blaming 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18.

@fskale
Copy link

fskale commented Mar 27, 2019

I have the same problem with nextcloud 15.0.5. intl extension is installed and active (as confirmed py phpinfo()), the message persists blaming 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18.

I have exactly the same problem.
Using phpbrew 7.1.21 and the native intl module is enabled.

php-fpm 116329 nextcloud  mem    REG              254,4  2648576   295188 /opt/phpbrew/php/php-7.1.21/lib/php/extensions/no-debug-non-zts-20160303/intl.so
intl

Internationalization support => enabled
version => 1.1.0
ICU version => 52.1
ICU Data version => 52.1

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

To be clear, having an active patchwork plugin, the error will always be triggered.
Line 18:

@trigger_error('You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead.', E_USER_DEPRECATED);

There's no if or anything else.
How can the loading of the pathwork lib be disabled ?
My workaround is commenting the line, it's filling up the logs at every login !

Would be helpful to have a fix handy.
Rgds.
Franz

@kesselb
Copy link
Contributor

kesselb commented Mar 27, 2019

There's no if or anything else.

https://github.com/nextcloud/3rdparty/blob/master/patchwork/utf8/src/Patchwork/Utf8/Bootup.php#L108-L122 here is the conditional you are looking for. If grapheme_strlen is available on your system the fallback implementation is not loaded.

On most systems there are different php configurations for cli/cgi/fpm/apache2. You need to enable the module for cli and your webserver (cgi, fpm or apache2 depends on your setup).

@fskale
Copy link

fskale commented Mar 28, 2019

There's no if or anything else.

https://github.com/nextcloud/3rdparty/blob/master/patchwork/utf8/src/Patchwork/Utf8/Bootup.php#L108-L122 here is the conditional you are looking for. If grapheme_strlen is available on your system the fallback implementation is not loaded.

On most systems there are different php configurations for cli/cgi/fpm/apache2. You need to enable the module for cli and your webserver (cgi, fpm or apache2 depends on your setup).

Found the problem,
the periodical cronjob was active, and for some reason, it used the old php-version. (7.1.11).
I simply restarted cron and now it works as expected.
I think @Ablinne should check the php-version and the cronjob if using the cron method.
For me, case closed.

Thx.
Franz

@Ablinne
Copy link

Ablinne commented Mar 28, 2019

@fskale Spot on, thank you very much! It was also the cronjob in my case. It was using a different php version which did not have intl. Problem fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests