Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rdiyto's avatar

Getting an error while installing composer

I just installed Apache, PHP, MySQL, and phpMyAdmin. Then I want to install Composer for my Laravel project to run smoothly. But I'm getting an error while installing Composer like this:

The PHP exe file you specified did not run correctly:
D:\php\php.exe

The php.ini used by your command-line PHP is: D:\php\php.ini

A setting in your php.ini could be causing the problem: Either the 'extension_dir' value is incorrect or a dll does not exist.

Program Output:
PHP Warning:  PHP Startup: Unable to load dynamic library 'oci8_12c' (tried: ext\oci8_12c (The specified module could not be found), ext\php_oci8_12c.dll (The specified module could not be found))
PHP Warning:  PHP Startup: Unable to load dynamic library 'oci8_19' (tried: ext\oci8_19 (The specified module could not be found), ext\php_oci8_19.dll (The specified module could not be found))
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_firebird' (tried: ext\pdo_firebird (The specified module could not be found), ext\php_pdo_firebird.dll (The specified module could not be found))
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_oci' (tried: ext\pdo_oci (The specified module could not be found), ext\php_pdo_oci.dll (The specified module could not be found))

I installed all of that on the D: drive.

I've tried to uncomment extension_dir on php.ini:

; Directory in which the loadable extensions (modules) reside.
; https://php.net/extension-dir
; extension_dir = "./"
; On windows:
extension_dir = "ext"
0 likes
2 replies
LaryAI's avatar
LaryAI
AI
Best Answer
Level 58

The error message suggests that some required PHP extensions are missing. To fix this issue, you need to install the missing extensions.

If you are not using these extensions, you can simply comment them out in the php.ini file.

To install the missing extensions, you can follow these steps:

  1. Open the php.ini file and comment out the following lines by adding a semicolon (;) at the beginning of each line:
;extension=oci8_12c
;extension=oci8_19
;extension=pdo_firebird
;extension=pdo_oci
  1. Save the php.ini file and restart Apache.

  2. Open a command prompt and run the following command to install the missing extensions:

D:\php\php.exe -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
D:\php\php.exe composer-setup.php
D:\php\php.exe -r "unlink('composer-setup.php');"
  1. Open the php.ini file again and uncomment the lines you commented out earlier.

  2. Save the php.ini file and restart Apache.

  3. Run the following command to verify that Composer is installed:

composer --version

This should display the version of Composer installed on your system.

1 like
rdiyto's avatar

@LaryAI The command prompt that you gave doesn't work.

Then I followed your instructions to add a semicolon (;) at the beginning of each line, and I tried to install again with the Composer-Setup.exe that I downloaded. That works!

I'm running composer --version, and it's shown.

Please or to participate in this conversation.