Php curl dll unable to load dynamic library

Как исправить PHP Предупреждение: PHP Startup: невозможно загрузить динамическую библиотеку ‘ext \\ php_curl.dll’?

В настоящее время у меня есть PHP 5.5.12 и Apache 2.4, установленные на Windows Server 2008 R2. Все работает отлично, без проблем/предупреждений. То, что я сделал, копирует один и тот же файл/конфигурацию Apache на другой сервер. Я скопировал каталог C:\PHP , а затем каталог C:\Apache24 и вставил их в новый сервер. Затем я установил Apache с одним изменением (т.е. httpd -k install .) Я изменил номер порта с 80 на 8877. Apache работает без проблем и работает на порту 8877. Я также могу открыть страницу по умолчанию, перейдя на SERVER_IP_ADDRESS: 8877, и он работает. Но PHP не работает должным образом. В файле error.log с сервера Apache я получаю предупреждение, указанное ниже

PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_curl.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_ldap.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_mysqli.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_openssl.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_pdo_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_sqlsrv_55_ts.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_pdo_sqlsrv_55_ts.dll' - The specified module could not be found.\r\n in Unknown on line 0 

Я не могу понять, почему я получаю эту ошибку? Все файлы .dll, в которых указано предупреждение «Не удалось найти указанный модуль», существуют в C:\PHP\ext directoryphp Расширения PHP расположены в

 Volume in drive C is OS Volume Serial Number is C63C-1D75 Directory of C:\php\ext 07/29/2014 06:42 PM . 07/29/2014 06:42 PM .. 04/30/2014 02:46 PM 66,560 php_bz2.dll 04/30/2014 02:46 PM 72,704 php_com_dotnet.dll 04/30/2014 02:46 PM 507,392 php_curl.dll 04/30/2014 02:46 PM 18,944 php_enchant.dll 04/30/2014 02:46 PM 43,008 php_exif.dll 04/30/2014 02:46 PM 2,679,808 php_fileinfo.dll 04/30/2014 02:46 PM 1,358,848 php_gd2.dll 04/30/2014 02:46 PM 40,960 php_gettext.dll 04/30/2014 02:46 PM 240,128 php_gmp.dll 04/30/2014 02:46 PM 831,488 php_imap.dll 04/30/2014 02:46 PM 65,024 php_interbase.dll 04/30/2014 02:46 PM 261,632 php_intl.dll 04/30/2014 02:46 PM 179,200 php_ldap.dll 04/30/2014 02:46 PM 1,239,552 php_mbstring.dll 04/30/2014 02:46 PM 36,864 php_mysql.dll 04/30/2014 02:46 PM 88,576 php_mysqli.dll 04/30/2014 02:46 PM 141,824 php_oci8.dll 04/30/2014 02:46 PM 142,336 php_oci8_11g.dll 04/30/2014 02:46 PM 120,320 php_opcache.dll 04/30/2014 02:46 PM 72,704 php_openssl.dll 04/30/2014 02:46 PM 21,504 php_pdo_firebird.dll 04/30/2014 02:46 PM 24,576 php_pdo_mysql.dll 04/30/2014 02:46 PM 23,040 php_pdo_oci.dll 04/30/2014 02:46 PM 20,480 php_pdo_odbc.dll 04/30/2014 02:46 PM 27,648 php_pdo_pgsql.dll 04/30/2014 02:46 PM 465,408 php_pdo_sqlite.dll 08/28/2012 04:15 PM 186,520 php_pdo_sqlsrv_54_ts.dll 06/26/2013 03:22 PM 166,400 php_pdo_sqlsrv_55_ts.dll 04/30/2014 02:46 PM 90,112 php_pgsql.dll 04/30/2014 02:46 PM 12,288 php_shmop.dll 04/30/2014 02:46 PM 385,536 php_snmp.dll 04/30/2014 02:46 PM 236,544 php_soap.dll 04/30/2014 02:46 PM 54,784 php_sockets.dll 04/30/2014 02:46 PM 617,472 php_sqlite3.dll 08/28/2012 04:15 PM 204,952 php_sqlsrv_54_ts.dll 06/26/2013 03:22 PM 183,296 php_sqlsrv_55_ts.dll 04/30/2014 02:46 PM 31,744 php_sybase_ct.dll 04/30/2014 02:46 PM 236,544 php_tidy.dll 04/30/2014 02:46 PM 51,712 php_xmlrpc.dll 04/30/2014 02:46 PM 231,936 php_xsl.dll 40 File(s) 11,480,368 bytes 2 Dir(s) 83,103,895,552 bytes free 

потому что расширения не загружены. Я предполагаю, что конфигурация верна, поскольку одна и та же конфигурация работает на другом сервере. Как я могу исправить эту проблему с запуском PHP?

Читайте также:  Python time add month

Источник

PHP Startup: Unable to load dynamic library php_curl.dll

Oops, «C\php» in PATH was missing a colon. Changed it to «C:\php» and it works now. I had a feeling it would turn out to be something like this. Oh well.

Solution 2

  1. extension=php_curl
  2. copy libssh2.dll from C:\php into C:\apache\bin
  3. copy libcrypto-*.dll and libssl-*.dll from C:\php into C:\apache\bin (if it doesn’t exist)

Solution 3

We have faced similar problem in our Environment.

We uninstalled Apache and installed it again with following commands:

c:\Apache\bin httpd -k uninstall c:\Apache\bin httpd -k install 

and magic. The problem is solved.

Solution 4

In PHP 7.4:

It’s a problem related to Windows , if you are using Apache2.x + Php , the trick consists in using LoadFile to force the loading of CURL as explained in my Guide. You don’t need strange things or rituals to have CURL working on your machine, you only need edit httpd.conf and add this:

# load CURL library on Windows LoadFile "$/php/libssh2.dll" 

Mr. Squidward

Updated on November 20, 2020

Comments

  • php.ini is in C:\php\
  • php_curl.dll is in C:\php\ext\
  • libeay32.dll and ssleay32.dll are in C:\php\
  • extension=php_curl.dll is uncommented in php.ini
  • Environment variable PATH = %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C\php;C:\php\ext;C:\Apache24\bin
  • phpinfo() shows that C:\php\php.ini is the config file being used
  • php.ini extension_dir = «C:\php\ext»
  • Apache is from here
  • PHP is from here
  • OS is Windows Server 2008 R2 Datacenter

I’ve restarted several times. Other extensions are loading from the extension directory. I’ve also tried re-downloading the PHP zip file and replacing C:\php with the contents of the freshly downloaded zip file. I had this problem on a different server a while back when I was updating PHP and Apache. Replacing C:\php with a new copy of the zip file did fix it, but it is not helping now.

I will be happy to provide any additional information you may need.

phpinfo() configure command

cscript /nologo configure.js «—enable-snapshot-build» «—disable-isapi» «—enable-debug-pack» «—without-mssql» «—without-pdo-mssql» «—without-pi3web» «—with-pdo-oci=c:\php-sdk\oracle\x86\instantclient_12_1\sdk,shared» «—with-oci8-12c=c:\php-sdk\oracle\x86\instantclient_12_1\sdk,shared» «—enable-object-out-dir=../obj/» «—enable-com-dotnet=shared» «—with-mcrypt=static» «—without-analyzer» «—with-pgo» .

Источник

alecos71 / Fix-Curl-SQLite3-in-PHP-7.4-under-Windows.md

If you have just downloaded and configured PHP 7.4 and you want to use CURL and SQLite3 you could run into a serious PHP-generated error for the reason that both CURL and SQlite3 make use of an external library located in the PHP directory. First SQLite3 was integrated into PHP but from version 7.4 no longer. The errors are these:

PHP Warning: PHP Startup: Unable to load dynamic library ‘pdo_sqlite’

PHP Warning: PHP Startup: Unable to load dynamic library ‘sqlite3’

PHP Warning: PHP Startup: Unable to load dynamic library ‘php_curl’

CURL depends on the libssh2.dll library whereas SQLite3 depends on the libsqlite3.dll library. Below are the instructions to solve the problem definitively.

To enable CURL and SQLite3 on Windows with PHP 7.4 first edit httpd.conf (Apache) and add the following lines:

# load php.ini from chosen directory
Define SRVROOT «F:/Apache24»
ServerRoot «$»
PHPIniDir «$/php»

# load PHP Core library on Windows
LoadFile «$/php/php7ts.dll»
LoadFile «$/php/libpq.dll»

# load CURL library on Windows
LoadFile «$/php/libssh2.dll»

# load SQLite3 library on Windows
LoadFile «$/php/libsqlite3.dll»

# load PHP 7.4 module on Windows
LoadModule php7_module «$/php/php7apache2_4.dll»

Then edit php.ini (PHP) and uncomment like below:

extension=curl
extension=pdo_sqlite
extension=sqlite3

Now CURL and SQLite3 are enabled and working fine under Windows using PHP 7.4

Источник

Как исправить ошибку «PHP Startup: Unable to load dynamic library»?

Для проекта необходима версия «php»: «^7.1.3», у меня была установлена в модулях 7.0.14 в версии 5.2.2.0 Пришлось скачать OS версию 5.2.8 В модулях выбран php 7.2*64 Apache 7.2*62
В phpinfo также инфа о том, что версия 7.2

В параметрах был изменен путь и версия php: Компьютер -> Свойство системы -> Дополнительный параметры -> «Дополнительно : Переменная среда» В системных переменных «Path» D:\OpenServer\modules\php\PHP-7.2*64

Но в cmd при запуске команды «composer update» теперь ругается на отсутствие кучи библиотек

PHP Warning: PHP Startup: Unable to load dynamic library ‘php_mbstring.dll’ (tried: w:/modules/php/PHP-7.2-x64/ext/php_mbstring.dll (▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒. ), w:/modules/php/PHP-7.2-x64/ext/php_php_mbstring.dll.dll (▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒. )) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library ‘php_bz2.dll’ (tried: w:/modules/php/PHP-7.2-x64/ext/php_bz2.dll (▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒. ), w:/modules/php/PHP-7.2-x64/ext/php_php_bz2.dll.dll (▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒. )) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library ‘php_curl.dll’ (tried: w:/modules/php/PHP-7.2-x64/ext/php_curl.dll (▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒. ), w:/modules/php/PHP-7.2-x64/ext/php_php_curl.dll.dll (▒▒ ▒▒▒▒▒▒ ▒▒

[Composer\Exception\NoSslException] The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl ex tension, you can disable this error, at your own risk, by setting the ‘disable-tls’ option to true.

В config php 7.2 *64 эти extension имеются и не закомм.

Источник

php_curl ошибка

Железо и софт: Винда 2003 серв, апач 2,2,8 пхп 5,2,5
При запуске апача выдаёт следующую ошибку:
PHP Startup: Unable to load dynamic libary ‘C:/usr/php/php_curl.dll’ — Опереционная система не может запустить %1.

Логи апача:
PHP Warning: PHP Startup: Unable to load dynamic library ‘C:/usr/php/php_curl.dll’ — \xce\xef\xe5\xf0\xe0\xf6\xe8\xee\xed\xed\xe0\xff \xf1\xe8\xf1\xf2\xe5\xec\xe0 \xed\xe5 \xec\xee\xe6\xe5\xf2 \xe7\xe0\xef\xf3\xf1\xf2\xe8\xf2\xfc %1.\r\n in Unknown on line 0

Расскаментил библиотеку «php_openssl» теперь при старте апач и на неё тоже ругаетсо.
Попробывал расскаментить какуето другую библиотек, апач при старте не ругается.

Бибилиотека лежит в C:/usr/php
патч:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\usr\php;C:\Program Files\MySQL\MySQL Server 5.1\bin

Помогите разобратся с ошибкой и как её устранить. пожалуйста!

2 Ответ от Hanut 2008-06-07 08:03:11

Re: php_curl ошибка

Gans
Библиотеки должны лежать в каталоге ext, который в свою очередь должен быть указан в директиве extension_dir.
Пример:
extension_dir = «C:/php/ext»

Также проверьте, чтобы в httpd.conf была установлена директива указывающая местоположение конфигурационного файла PHP.
Пример:
PHPIniDir «C:/php»

Указанная вами библиотека является только обверткой для других библиотек, которые должны находиться в корне каталога php. Скачайте архив с полным дистрибутивом PHP (без инсталлятора) и используйте его, он полный.

3 Ответ от Gans 2008-06-07 18:13:16

Re: php_curl ошибка

в директиве extension_dir
да я всю папку ext закинул в корень папки «C:/php»

PHPIniDir «C:/php»
знаю точно что у меня этого нету в конфигурации. сейчас поставлю.

Скачайте архив с полным дистрибутивом PHP
та я изначельно вроди как все с архива выгрузил, не инсталятором.

4 Ответ от Hanut 2008-06-07 19:28:37

Re: php_curl ошибка

да я всю папку ext закинул в корень папки «C:/php»

Зря. Сделайте как было и укажите корректный extension_dir.

5 Ответ от Gans 2008-06-07 20:16:26

Re: php_curl ошибка

C «C:/php» удалил файлы пермещеные с «C:/php/ext»
Есстествено сменил extension_dir на extension_dir = «C:/php/ext»

Действительно как только прописал PHPIniDir «C:/php» ошибки исщезли, но сайт теперь загружается с ошибками и форум (phpBB3) не роботает — просто белая страница, а на сайте сверху ошибка:

Warning: session_start() [function.session-start]: open(./session/\sess_af2b1e7a179d38ab5c8cc97949e1768e, O_RDWR) failed: No such file or directory (2) in F:\www\site\index.php on line 4
Warning: session_start() [function.session-start]: Cannot send session cache limiter — headers already sent (output started at F:\www\site\index.php:4) in F:\www\site\index.php on line 4

Строчки «index.php» с 1 по 11:

session_save_path(‘./session/’);
session_start();
if (!isset($del)) $del=’0′;
if ($del==’0′)session_register(‘us’, ‘pass’,’del’);
$del=1;
>
if ($del==2 or $id==0)session_unset();
session_destroy();

Hanut подскажи решения данной проблемы.

Сообщение добавлено Sat Jun 7 21:18:08 2008
display_errors отключен.

Источник

Оцените статью