From nobody Mon Sep 30 18:39:25 2024 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XHVGn58tFz5XTbn for ; Mon, 30 Sep 2024 18:39:29 +0000 (UTC) (envelope-from ml-ktk@netlabs.org) Received: from r2-d2.netlabs.org (r2-d2.netlabs.org [213.238.45.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4XHVGm0LVBz4trF for ; Mon, 30 Sep 2024 18:39:27 +0000 (UTC) (envelope-from ml-ktk@netlabs.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of ml-ktk@netlabs.org designates 213.238.45.90 as permitted sender) smtp.mailfrom=ml-ktk@netlabs.org; dmarc=none Received: (qmail 48435 invoked by uid 89); 30 Sep 2024 18:39:25 -0000 Received: by simscan 1.4.0 ppid: 48430, pid: 48432, t: 0.0682s scanners: clamav: 0.99.2/m:59/d:26096 Received: from unknown (HELO ?192.168.82.227?) (ml-ktk@netlabs.org@213.144.156.18) by 0 with ESMTPA; 30 Sep 2024 18:39:25 -0000 Message-ID: Date: Mon, 30 Sep 2024 20:39:25 +0200 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: freebsd-questions@freebsd.org From: Adrian Gschwend Subject: Issue with MediaWiki Installation: IntlException and Locale Problems in Apache Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-3.06 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-0.91)[-0.912]; NEURAL_HAM_SHORT(-0.86)[-0.855]; R_SPF_ALLOW(-0.20)[+ip4:213.238.45.90/32]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:9211, ipnet:213.238.32.0/20, country:DE]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[netlabs.org]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 4XHVGm0LVBz4trF X-Spamd-Bar: --- Hi group, I'm trying to install MediaWiki on FreeBSD with Apache and PHP 8.1 via mod_php, but I keep running into an issue related to the `Intl` extension and locale settings. During the MediaWiki installation process, I get the following error: ``` IntlException: Constructor failed ``` There are no errors in the Apache log, and I have doublechecked that the `Intl` extension is enabled and working in CLI PHP. When I run the same code via Apache, it throws an exception. I created a minimal PHP test case to see if I could reproduce the error outside of MediaWiki. Here's the test script: ``` format(12345.67) . "\n"; } catch (Exception $e) { echo "IntlException: " . $e->getMessage() . "\n"; } ?> ``` Results: - Command Line PHP: ``` Current locale: C/C.UTF-8/C/C/C/C Number formatting test: 12,345.67 ``` - Apache (via browser): ``` Current locale: C/C.UTF-8/C/C/C/C IntlException: Constructor failed ``` So the same script works on the same jail on cli but not in Apache with mod_php. What I've Tried - I have set `LANG` and `LC_ALL` to `en_US.UTF-8` in both the Apache environment and PHP’s `php.ini`. - I verified that the `Intl` extension is loaded in both CLI and Apache environments. - `phpinfo()` reports the correct locale in Apache (`en_US.UTF-8`), but the error persists. I'm really running out of ideas here, I run MediaWiki for years and while it's a new jail to upgrade my env, this is not something I've seen before. Note that I tried the same with PHP 8.2, same error. Any suggestions on how to resolve this would be greatly appreciated. thanks & regards Adrian