Перейти к основному содержанию
Тема: PHP Warning: PHP Startup: Unable to load dynamic library 'C:/php71/ext\php_curl. (Прочитано 3103 раз) предыдущая тема - следующая тема

PHP Warning: PHP Startup: Unable to load dynamic library 'C:/php71/ext\php_curl.

Вроде нашёл решение:

Цитата
WINDOWS Apache 2.4.x + PHP 7.0.x SOLUTION HERE:
Solution: Put libeay32.dll, libssh2.dll, ssleay32.dll files under dir specified in httpd.conf's ServerRoot directive. These dlls can be found compiled under php root folder.
Reasons:
Problem is php_curl.dll requires to access following libraries while loading: libeay32.dll, libssh2.dll, ssleay32.dll and it does not make sense if you put them in ./php/ext dir or if you put php extensions in php root dir.
Of course you can put them in c:\Windows or in some global folder defined in PATH but if you dont want to do this and you want that your apache+php installation was portable:
The path specified in ServerRoot in httpd.conf is treated as home path for php. The behaviour is similar to situation where you include ./path/to/some.php file in ./index.php and home path for some.php file is still ./ the dir where index.php resides.
In shorts just put those three dlls right in dir you specified in httpd.conf ServerRoot directive and php_curl.dll will not fail to load again.

https://stackoverflow.com/a/34381745/1577548

Коротко на русском:
В вашем конфиге апача есть примерно такое:
Define SRVROOT "C:/Program Files/Apache24"
ServerRoot "${SRVROOT}"
Вот в эту папку апача нужно скопировать (из папки вашего php) файлы libeay32.dll, libssh2.dll, ssleay32.dll
Файла ssleay32.dll у меня не было, но всё равно заработало и curl в php появился.
Не забудьте рестартануть свой апач, чтоб увидеть изменения.

Re: PHP Warning: PHP Startup: Unable to load dynamic library 'C:/php71/ext\php_curl.

Ответ #1
В apache + php 7.2 curl так и не завёлся. Сегодня я отключил апач, запустил nginx + php fastcgi и curl заработал без танцев с бубном :dancers:

 

Re: PHP Warning: PHP Startup: Unable to load dynamic library 'C:/php71/ext\php_curl.

Ответ #2
Опять на винде танцы с бубном. Пару часов гуглил, плюнул, и начал использовать docker.

Готовый рецепт apache + php: https://github.com/docker/awesome-compose/tree/master/apache-php

https://hub.docker.com/_/php