I have a LAMP server Denwer installed on Windows 7. When I try to install composer, it stops with "The openssl extension is missing... If possible you should enable it or recompile php with --with-openssl" message.
Despite that I OpenSSL extension already enabled, I checked that by running this command:
> php -i | find "OpenSSL"
OpenSSL support => enabled
Any ideas?
Related
I am trying to install CiviCRM on my laptop through Drupal 8.
please help me with this error.
This is simply that your version of PHP doesn't have the intl extension compiled in.
How you address this, very much depends on how you've installed PHP on your system or, if you haven't at all (and are using the built-in system PHP).
I'm just going to pick a generic route here, and assume this is OSX PHP as some versions don't come with intl support (e.g. PHP 7.3 shipped with macOS Catalina) and say ... Save yourself some time and just use Homebrew to do this. Follow the instructions to install brew, then install your required version of PHP using;
brew update
brew install php#7.3
brew link php#7.3
It likely already has intl support, you can test by using;
php -m | grep intl
I have installed openssl#1.1 using brew and added the path to my bash-profile. From Terminal I run "which openssl" and it shows the correct location (as in my bash-profile). Also when I run "openssl version" is shows 1.1.0f so that is also correct.
But when I run "composer diagnose" I get the following warning:
The OpenSSL library (0.9.8y) used by PHP does not support TLSv1.2 or TLSv1.1.
If possible you should upgrade OpenSSL to version 1.0.1 or above.
I also ran "composer show --platform" and it shows:
lib-openssl 0.9.8.25 OpenSSL 0.9.8y 5 Feb 2013
What do I need to do to get Composer to use the correct version of OpenSSL?
I'm running:
OSX 10.12.6,
MAMP PHP 7.0.0,
Composer 1.5.2,
Brew 1.3.5
Any help would be appreciated.
UPDATE:
I tried adding symlinks as mentioned in many of the offered threads:
ln -s /usr/local/opt/openssl#1.1/lib/libcrypto.1.1.dyli /usr/local/lib/
ln -s /usr/local/opt/openssl#1.1/lib/libssl.1.1.dylib /usr/local/lib/
It didn't work. PHP still shows:
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 0.9.8zh 14 Jan 2016
OpenSSL Header Version => OpenSSL 0.9.8y 5 Feb 2013
Openssl default config => /System/Library/OpenSSL/openssl.cnf
I first tried to symlink from /System/Library/OpenSSL but it wasn't permitted. Maybe I need to sudo it. Before I do that, are there any risks I should be aware of? Am I on the right path? It's very frustrating that some commands in Terminal point to the new openssl, while others don't.
This is exactly the issue I had.
I updated my OpenSSL per these instructions(the only way I found that worked on Mac OS High Sierra
Yet still, Composer showed an error
Then, I followed the instructions in this Video
Problem solved (finally, after 3 days of dead ends)
Check PHP version your Mac OS shipping. It should like PHP 5.6.
Try to upgrade your version of PHP to 7.0 or above.
And run command again check version on your current folder.
php -v
php -i | grep OpenSSL
If the output of php -v still doesn’t echoes the version 7, type following command to update your path.
export PATH=/usr/local/php5/bin:$PATH
I successfully installed pear & pecl on my windows machine.
Now, i would like to install gnupg extension using pecl.
My need is to get the gnupg.so extension for php7 to upload it on a linux server on which I have no rights. The extension does not exist on this server, this is the reason why I need to get it to transfer it.
When I run pecl install gnupon my machine, I get the following result:
C:\WEB>pecl install gnupg-1.4.0.tgz
6 source files, building
ERROR: The DSP gnupg.dsp does not exist.
After some research, I found out that I migth need a .dll but there is no way to find anything about it.
Is there anyone who can help me?
pecl install downloads the source code and compiles it for the system pecl runs on. It will not work on a different system, especially not on a Linux one when you are compiling it on windows.
You have three options that will work, in order of preference:
Install the distribution-provided pecl-gnupg package
Run the pecl install command on your server
Setup an identical machine as your live server, run pecl install on it and copy the generated .so file to your live server.
I installed several CMS that require Composer.
Since 2 days i got error and can't go on.
[RuntimeException] You must enable the openssl extension to download files via https
I check the following:
$ openssl version OpenSSL 1.0.1e 11 Feb 2013
$ which openssl /opt/local/bin/openssl
phpinfo say Phar - Native OpenSSL support enabled and OpenSSL support enabled.
Still if i do
$ php -info| grep openssl OpenSSL support => disabled (install ext/openssl)
Does someone has a clue about what i should do to be able to run Composer ?
In doubt (tks to Sven for pushing me that direction ;) ), I reinstall using port the openssl extension.
sudo port install php5-openssl
It didn't download files but reset something in the preferences and i was able to run Composer install properly on Tiki Wiki CMS (the CMS i'm using most).
which version you install is also important. there is a bug in openssl 0.9.8.
read more here: https://github.com/composer/composer/issues/2021
I am trying install php5-intl on my osx lion.
I did install also Xcode.
When I run the command to install the module I get the following message.
> sudo port install php5-intl
---> Computing dependencies for php5-intl
---> Cleaning php5-intl
> locate *intl*|grep so\$
/opt/local/lib/php/extensions/no-debug-non-zts-20090626/intl.so
> sudo apachectl restart
My question is:
Is the php5-intl module installed and ready to be used in my apache?
P.S.:
If I look to my phpinfo() I don't see any reference to php-intl. Is it normal?
If I run
> php -m | grep intl
PHP Warning: Module 'intl' already loaded in Unknown on line 0
intl
Then If I try to use it in Synfony2 I get the following error:
The Symfony\Component\Locale\Stub\StubLocale::getDisplayLanguage() is not implemented.
Please install the 'intl' extension for full localisation capabilities
If I look to my phpinfo, no trace of php5-intl.
If it's not listed in phpinfo() (or php -m on the command line) then no, the module isn't enabled.
If I were you I'd get this working on the command line first, since if I remember right Port uses it's own version of PHP (and Apache?), which could cause confusion.
You'll need to enable the module with extension=php5-intl.so in your php.ini file, after adding that php -m should include intl, and you know the extension is working on the command line.
Edit:
PHP Warning: Module 'intl' already loaded in Unknown on line 0
This sounds like you maybe have the module enabled twice, though I don't think that's necessarily your problem.
Try running a simple command line script that calls an intl function, it sounds to me like it's enabled for the command line but not for apache.