Php warning php startup unable to load dynamic library openssl

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7 Curl and OpenSSL cannot be loaded #199

PHP 7 Curl and OpenSSL cannot be loaded #199

Comments

I have tried to migrate my project to PHP 7 but I get these errors after start PHP ver. 7.1 and 7.0.13

PHP Warning: PHP Startup: Unable to load dynamic library ‘D:/neard/bin/php/php7.1.0/ext\php_curl.dll’ — %1 nelze spustit.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘D:/neard/bin/php/php7.1.0/ext\php_openssl.dll’ — %1 nelze spustit.\r\n in Unknown on line 0

So both extensions cannot be loaded, on PHP 5.6.16 it works normally, but does not work for PHP 7.1 and PHP 7.0.13 as well. I get the same errors. My apache version is 1.4.12 on WIN 8.1.

Could you please check this issue? I love this piece of software and use it every day, thank you!

The text was updated successfully, but these errors were encountered:

sure, it’s of course Apache 2.4.12, thanks for quick answer;-) I can’t wait for 1.0.22, thank you!

Can you try restarting your computer and check if it works ?

I did a restart but have no luck, get the same issue, errors are all the same:-( Sorry.

Please read the Reporting an issue page and post logs.

I did some more tests and on Neard v1.0.20 it works normally, the problem is just on my older Neard v1.0.16 installation. So there are probably some binary incompatibility of dll extensions. I will udpate on the latest version, in case you want to go through my logs file after all, let me know, I will upload them somewhere. But I think it is just wasting of your time. Thanks.

Hum ok so you were on Neard 1.0.16 and upgrade to 1.0.20 but do you follow the UPGRADE.md ?

Читайте также:  Парсинг таблицы excel python

I think the best way is to start from a fresh install of the 1.0.22 release and then migrate your projects from www and your MySQL and/or MariaDB databases.
Then recreate your vhosts and aliases.

I have two laptops, on the first of them I have reported the problem in the first part of this ticket. On the second one I did migration from 1.0.21 to 1.0.22 following the UPGRADE.md. Then I have installed PHP 7.1.0, upgrade to Apache v2.4.9 and get the same error:

PHP Warning: PHP Startup: Unable to load dynamic library ‘C:/Data/neard/bin/php/php7.1.0/ext\php_curl.dll’ — %1 nelze spustit.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘C:/Data/neard/bin/php/php7.1.0/ext\php_openssl.dll’ — %1 nelze spustit.\r\n in Unknown on line 0

But when I upgrade to the latest Apache v2.4.23 it works normally and both extensions is loaded correctly.

So it looks like the Apache problem, the older version is maybe compiled in a different way, so dll library cannot be loaded.

After migration to the latest versions it works on both laptops. Just close this issue, thank you!

So it looks like the Apache problem, the older version is maybe compiled in a different way, so dll library cannot be loaded.

No, it’s an OpenSSL version mismatch problem possibly compounded by Visual C++ version mismatch problem as well.

Apache 2.4.9 came with OpenSSL 1.0.1 and PHP7 uses 1.0.2 and when running php as a module (phpXapache2_4.dll X=5or7) PHP uses the OpenSSL from Apache which is shared. So if Apache’s OpenSSL is 1.0.1 and you try running PHP7, it ain’t gonna work because the OpenSSL DLLs have different internal structures.

Similar with VC versions as well. Common belief is that Apache VC14 can run modules of all prior VC versions but not the other way around. So with that VC9/10/11 builds of Apache cannot run PHP7 as a module. I’ve never cared to test the value of this belief but simply keep it in mind when it comes to loading 3rd party modules in Apache.

Ok so it’s linked to the OpenSSL version like you said.
I will make some tests with the Apache 2.4.9 version.

Infos have been added on the module page of Apache and PHP.
As Apache is on top of PHP (php is loaded as a module for now), Apache OpenSSL version must be equal or greater than OpenSSL version of PHP. I will add a FAQ section about this question.
If you have other suggestions, do not hesitate.

Источник

Php composer openssl ошибка

Прежде чем спросить, я должен сказать, что у меня есть пробовал каждый аналогичный вопрос здесь, в стеке и в другом месте, и не удалось. Я не могу использовать composer из-за этой ошибки:

requires ext-openssl * -> the requested PHP extension openssl is missing from your system. 
  • Я раскомментировал ;extension=php_openssl.dll в php.ini (оба cli и normal) — не работал
  • Установленный openssl через терминал за пределами php — не работал
  • Проверьте phpinfo() , если openssl загружен и активирован
Читайте также:  js .html demo

Изображение 27785

  • и еще немного похоже на запуск композитора через php -c /opt/lampp/etc/php.ini composer.phar install , где я получаю ошибку

PHP Warning: PHP Startup: Unable to load dynamic library /usr/include/php5/ext/php_openssl.so — /usr/include/php5/ext/php_openssl.so: cannot open shared object file: No such file or directory in Unknown on line 0

То, что я нашел странным, — это расположение расширений.

В phpinfo() расширение dir равно /usr/include/php5/ext/ , хотя я попытался указать другой каталог в php.ini и, конечно же, перезапустить apache и все еще не отображался в phpinfo() .

Но в команде php-config я получаю, что расширение dir равно / usr/local/lib/php/extensions/no-debug-non-zts-20100525

Я не уверен, что у меня есть несколько php для системы, но я попытался найти файлы php.ini, и только 2 придумали.

/etc/php5/cli/php.ini /opt/lampp/etc/php.ini 

Похоже, у вас есть две разные установки PHP. Вероятно, один из XAMPP (/ usr / local) и один из базы Ubuntu (/ usr). Если это так, вы можете отредактировать свой PATH, выбрав тот, который вам нужен, или просто удалить тот, который вам не нужен.

Откатите все изменения, которые вы внесли в файлы php.ini, и просто выполните следующие действия: tutsnare.com/how-to-install-laravel-on-ubuntu-lamp

2 ответа

Я предпочитаю устанавливать LAMP stack vs. xamp: это простой и простой конфигурационный пакет.

sudo apt-get install apache2 sudo apt-get install curl php5-cli php5 libapache2-mod-php5 php5-openssl sudo /etc/init.d/apache2 restart curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer 

Чтобы протестировать вашу установку, запустите:

с этой командой не требуется изменение php.ini и т.д.

Прежде всего, вам нужно понять правильную библиотечную файловую систему в соответствии с ОС. В Windows общие файлы библиотеки имеют расширение DLL, а в Linux файлы разделяемой библиотеки имеют расширение SO.

Всякий раз, когда вы делаете изменения в файле PHP.ini, вы не выполняете должным образом. Прежде всего, вы должны найти правильное расположение PHP. Поскольку служба apache работает, задача поиска местоположения будет легкой задачей:

$ httpd -V Server version: Apache/2.2.17 (Unix) Server built: Dec 17 2010 11:58:24 Server Module Magic Number: 20051115:25 Server loaded: APR 1.3.12, APR-Util 1.3.9 Compiled using: APR 1.3.12, APR-Util 1.3.9 Architecture: 32-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with. -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT="/etc/httpd" -D SUEXEC_BIN="/usr/sbin/suexec" -D DEFAULT_PIDLOG="logs/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="logs/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf" 

Ключевой линией на этом выходе является HTTPD_ROOT . Это определяет, где должен запускаться каталог Apache ROOT , /etc/httpd в моем случае. Поскольку нам нужно найти правильное расположение PHP open SERVER_CONFIG_FILE , которое будет подкаталогом «conf», как в моем случае.

Читайте также:  Positional only arguments python

Искать в файле env_module , который будет раскрывать правильное расположение PHP.

 . SetEnv PHP_PEAR_SYSCONF_DIR "location of PHP" SetEnv PHPRC "location of PHP" . 

Теперь откройте файл PHP.ini, внесите необходимые изменения

;;;;;;;;;;;;;;;;;;;;;; ; Dynamic Extensions ; ;;;;;;;;;;;;;;;;;;;;;; ; under UNIX: ; ; extension=msql.so ; ; . or with a path: ; ; extension=/path/to/extension/msql.so ; ; If you only provide the name of the extension, PHP will look for it inits ; default extension directory. ; extension=php_openssl.so 

Если проблема не решена, дайте мне знать.

Источник

windows — Warning: PHP Startup: Unable to load dynamic library ‘openssl’

I have xampp installed on my Windows 10 machine. Running php from command prompt gives error as below.

Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: D:\xamp\php\ext\openssl (The specified module could not be found.), D:\xamp\php\ext\php_openssl.dll (The specified module could not be found.)) in Unknown on line 0 

In php.ini for extension_dir I tried giving absolute path as well as relative path to extension directory. File is available in location D:\xamp\php\ext\php_openssl.dll. It still gives the error.

Answer

Solution:

Can you check if the loaded php.ini is the correct one ? php —ini also you can check php -m to check the loaded extension in cmd using php -m | findstr «xml»

also you can try to manually download the openssl extension: http://www.dlldownloader.com/php_openssl-dll/

Share solution ↓

Additional Information:

Didn’t find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Similar questions

Find the answer in similar questions on our website.

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

About the technologies asked in this question

PHP

PHP (from the English Hypertext Preprocessor — hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites. The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
https://www.php.net/

Welcome to programmierfrage.com

programmierfrage.com is a question and answer site for professional web developers, programming enthusiasts and website builders. Site created and operated by the community. Together with you, we create a free library of detailed answers to any question on programming, web development, website creation and website administration.

Get answers to specific questions

Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.

Help Others Solve Their Issues

Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.

Источник

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