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

Windows10下XAMPP环境安装Composer遇PDO加载错误问题求助

Fixing Composer Installation Warnings on XAMPP (Windows 10)

Hey there, let's work through these two warning messages step by step to get Composer installed smoothly:

1. Resolve "Unable to load dynamic library 'php_pdo.dll'"

First off, here's a key point: In modern PHP versions (like the ones bundled with recent XAMPP releases), PDO is built directly into the PHP core—you don't need to load a separate php_pdo.dll extension anymore. That's why the file is missing from your ext folder, even though you uncommented the line in php.ini.

To fix this:

  • Open your php.ini file (located at C:\xampp\php\php.ini)
  • Search for the line that looks like extension=php_pdo.dll or extension=pdo
  • Re-add the comment marker (;) at the start of that line to disable it
  • Save the file and restart your XAMPP Apache and PHP services

2. Fix "Module 'openssl' already loaded"

This warning pops up because the openssl extension is being loaded twice somewhere in your configuration. Here's how to track it down:

  • Open your php.ini file and search for openssl
  • You'll likely find two uncommented lines related to it—maybe one like extension=openssl and another like extension=php_openssl.dll
  • Keep only one uncommented line (preferably the one without the .dll suffix, which is standard for newer PHP versions) and comment out the duplicate
  • Additionally, check XAMPP's Apache configuration files (like httpd.conf or httpd-xampp.conf in C:\xampp\apache\conf) to make sure there aren't any extra lines loading the openssl module
  • Save all changes and restart your XAMPP services

Verify the Fix

After making these changes, open a command prompt and run:

php -v

Or to check loaded modules directly:

php -m

If the warnings are gone, you should be able to run the Composer installer without issues.

内容的提问来源于stack exchange,提问作者Firas-na

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.21 07:41:15