M
M
Makfroy2016-11-17 19:40:37
PHP
Makfroy, 2016-11-17 19:40:37

What is the composer problem?

Hello, when installing composer, it gives the following error:

The PHP exe file you specified did not run correctly:
C:\Server\bin\PHP\php.exe

The php.ini used by your command-line PHP is: C:\Server\bin\PHP\php.ini

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

Program Output:
Warning: PHP Startup: Unable to load dynamic library 'C:\Server\bin\PHP\ext\php_interbase.dll' - Не найден указанный модуль.
 in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'C:\Server\bin\PHP\ext\php_oci8_12c.dll' - Не найден указанный модуль.
 in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'C:\Server\bin\PHP\ext\php_pdo_firebird.dll' - Не найден указанный модуль.
 in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'C:\Server\bin\PHP\ext\php_pdo_oci.dll' - Не найден указанный модуль.
 in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'C:\Server\bin\PHP\ext\php_mb_string.dll' - Не найден указанный модуль.
 in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'C:\Server\bin\PHP\ext\php_sybase_ct.dll' - Не найден указанный модуль.
 in Unknown on line 0

What could be the problem, in php.ini the paths are written like this:
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
extension_dir = "C:\Server\bin\PHP\ext"
; On windows:
 extension_dir = "C:\Server\bin\PHP\ext"

On these paths all the files are, please help.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
R
romy4, 2016-11-17
@romy4

are they there?

E
Eugene Volf, 2016-11-17
@Wolfnsex

Try replacing backslashes (in paths) \with forward slashes: /perhaps they are interpreted as an escape character (which is most likely, otherwise it would not be possible to write a space, for example), or try \putting instead of \\, this may help.
Yes, and the correctness of the paths themselves needs to be checked.

D
dmitriy, 2016-11-17
@dmitriylanets

and you definitely have php.ini not php-cli.ini connected?

V
Vyacheslav Plisko, 2016-11-18
@AmdY

Do other extensions work fine?
Does the webserver start up normally?
Extensions are native or downloaded separately (if the version is not the same, php can pretend that it does not see them)
100500 years ago when I was dealing with Windows, I added the php and php / ext folder to the PATH variable

M
mike_spb_111111, 2021-02-16
@mike_spb_111111

I suffered with this problem for 4 hours, rummaged through a ton of forums. At the moment when I almost completely despaired, I got to several pages of discussions on github,
https://github.com/adoxa/ansicon/issues/108
https://github.com/composer/windows-setup/issues/80
https:// github.com/composer/windows-setup/issues/74
where very smart developers discussed how ANSICON can interfere with composer installation on 64-bit systems. I don't know much about all this, but this ANSICON seems to be some kind of system thing that sees variables like % sprogdir% and substitutes the correct path when running the command line and something else. In general, it does something with paths.
This was the last hope. I found a program on drp.su that removes ANSICON:
https://drp.su/ru/catalog-soft/other/ansicon-84781...
Demolished ANSICON with this program (in the process it was reported that I had version 1.66).
During the next attempt to install composer, I gave a similar error as before, but a different path to the extension files, which included: "% sprogdir%".
I replaced the path to the extensions (extensions_dir) in php.ini with a direct one, without variables (copied and pasted directly from the explorer line).
Trying to install composer again - hallelujah! successfully!
True, then also when initializing composer, since I removed ANSICON, and the system lost the ability to substitute a normal path instead of variables (as I understand it), composer init asked me to write the correct path in php.ini in the tmp_system_dir field (it seems there was such a field) - I registered a straight line, taken from the line of the folder explorer.
And composer init ran successfully.
And then I had to install ansicon back from the same site drp.su, because. php stopped working normally, apparently could not get to the extensions due to the demolished ansicon.
https://drp.su/ru/catalog-soft/other/ansicon-847817889 downloaded and installed v.1.66 from here.
In general, this problem is still really solved. I hope my information will help those who face this pain.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question