You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

安装Moodle遇php_intl.dll及opcache.enable检测失败问题求助

Fixing Moodle 3.4 Installation Issues on Windows XAMPP

Hey there, let's work through these two problems one by one—they're pretty typical for Windows XAMPP + Moodle setups, so I've got some targeted steps for you:

1. Resolving php_intl.dll Loading Failure

Your command prompt error makes it clear the extension can't be loaded, and it's almost always either missing files or incorrect configuration. Let's dig in:

  • Verify the php_intl.dll file exists
    Double-check that D:\Moodle_34\server\php\ext\php_intl.dll actually exists. Sometimes XAMPP installs don't include this extension by default—if it's missing, grab the matching thread-safe version from the PHP 7.1.10 Windows binaries (XAMPP uses thread-safe PHP).

  • Check ICU dependency files
    The php_intl.dll relies on several ICU library files (like icuuc62.dll, icuin62.dll, icudt62.dll, icuio62.dll—version 62 matches PHP 7.1.x). These files need to go in your PHP root directory (D:\Moodle_34\server\php\), not the ext folder. If they're missing, copy them from the root of the PHP binaries zip you downloaded into your PHP folder.

  • Confirm you're editing the right php.ini
    XAMPP has separate php.ini files for Apache and the command line: Apache uses apache/bin/php.ini, while CLI uses php/php.ini. Run php --ini in command prompt to check the CLI's ini, and create a phpinfo.php file (with <?php phpinfo(); ?>) in your Apache htdocs to verify which ini Apache loads. In both files (or at least the Apache one), uncomment:

    extension=php_intl.dll
    

    Also make sure ext_dir points correctly to your extensions folder:

    ext_dir = "D:\Moodle_34\server\php\ext"
    
  • Restart everything
    After editing php.ini, fully restart Apache (don't just reload), and close/reopen your command prompt to apply changes.

2. Fixing opcache.enable Detection Failure

Opcache issues usually boil down to incorrect extension loading or misconfiguration:

  • Enable the Zend Opcache extension
    In your Apache php.ini, find and uncomment the zend_extension line for opcache (it's a Zend extension, not a regular PHP extension):

    zend_extension=php_opcache.dll
    

    Ensure the path to php_opcache.dll is correct (it lives in your ext folder, so the relative path works if ext_dir is set properly).

  • Set opcache.enable to 1
    Add or update these lines in php.ini (these are Moodle-recommended settings):

    opcache.enable=1
    opcache.enable_cli=1  # Optional, but helps with CLI checks
    opcache.memory_consumption=128
    opcache.max_accelerated_files=4000
    

    The critical line here is opcache.enable=1.

  • Restart Apache and verify
    Restart Apache, then check your phpinfo.php page to see if the opcache section appears—this confirms it's loaded correctly. Then refresh Moodle's server check page.

Once you've gone through these steps, both checks should pass. If you're still stuck, double-check the phpinfo output to confirm which extensions are loaded—it'll help pinpoint where the config is failing.

内容的提问来源于stack exchange,提问作者Roy

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 09:04:37