我已经在 OpenBSD 7.3 上正确安装了 php-8.1.23、php-fpm 和 php-intl-8.1.23
当我使用以下代码在本地创建文件并使用 PHP 运行它时
$example_var = new Collate('en_US');
它没有显示任何错误,但是当我将其写入由将 fastcgi 传递到 php_fpm 的 Web 服务器提供的 index.php 文件中时,它会引发以下错误。
023/09/08 19:48:58 [error] 83128#0: *73 FastCGI sent in stderr: "PHP message: Default exception handler: Exception - Constructor failed Debug:
Error code: generalexceptionmessage
* line 75 of /lib/classes/collator.php: IntlException thrown
* line 75 of /lib/classes/collator.php: call to Collator->__construct()
* line 188 of /lib/classes/collator.php: call to core_collator::ensure_collator_available()
* line 263 of /lib/classes/collator.php: call to core_collator::asort()
* line 303 of /lib/classes/event/manager.php: call to core_collator::asort_objects_by_property()
* line 234 of /lib/classes/event/manager.php: call to core\event\manager::order_all_observers()
* line 103 of /lib/classes/event/manager.php: call to core\event\manager::init_all_observers()
* line 75 of /lib/classes/event/manager.php: call to core\event\manager::process_buffers()
* line 795 of /lib/classes/event/base.php: call to core\event\manager::dispatch()
* line 3670 of /course/lib.php: call to core\event\base->trigger()
* line 99 of /index.php: call to course_view()" while reading response header from upstream, client: <address>, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: