Can't run Composer on my Mac Mountain Lion - openssl extension - macos

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

Related

make fails to build squid with openssl (deprecated functions used)

I'm trying to build squid with openssl, but fail because make threats warnings as errors
An example: gadgets.h -> error 'void RSA_free(RSA*)' is deprecated; Since **Openssl 3.0.0** -Werror=deprecated-declarations ..
I assume that -Werror=deprecated-declarations instructs make to threat these warnings as errors. But in which file is -Werror=deprecated-declarations? How can I suppress this / avoid it?
I need squid with openssl.
france1 answers correct. But maybe "step by step" commands will help to someone. I successfully built Squid 5.5 on Ubuntu 22.04 with Openssl 3.0.2.
Download openssl 1.1.1j:
cd /tmp/
wget https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_1_1j.zip
Extract and install openssl to /usr/local/openssl_1_1_1j from source
unzip openssl-OpenSSL_1_1_1j.zip
cd ./openssl-OpenSSL_1_1_1j/
./config --prefix=/usr/local/openssl_1_1_1j --openssldir=/usr/local/openssl_1_1_1j/ssl
make
sudo make install
Export vars
export PATH="/usr/local/openssl_1_1_1j/bin:$PATH" LD_LIBRARY_PATH="/usr/local/openssl_1_1_1j/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH=/usr/local/openssl_1_1_1j/lib/pkgconfig
Download squid and compile with custom openssl:
wget http://www.squid-cache.org/Versions/v5/squid-5.5.tar.gz
tar -xzvf ./squid-5.5.tar.gz
cd squid-5.5/
./configure --enable-ssl-crtd --with-openssl=/usr/local/openssl_1_1_1j/lib
make
sudo make install
Works!
I can compile the latest version by openssl 3. It should be fixed
check https://github.com/squid-cache/squid/commit/3db8afad158dcdaa9390d8b998239e5763ae2cf4
# squid -v
Squid Cache: Version 5.7-VCS
Service Name: squid
This binary uses OpenSSL 3.0.2 15 Mar 2022.
Ha Ha!
These things are deprecated since Openssl 3.0.0.
I just used Openssl 1.1.1 LTS - and it worked!
But later on I noticed that there's a squid-openssl in the ubuntu 20.10 repository.. so I installed that.
Openssl 1.1.1l: https://www.openssl.org/source/openssl-1.1.1l.tar.gz

I am trying to install civicrm on my Mac and I got error in step no 5

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

Issue in installing Mcrypt extension in mac OS 10.13

I am trying to run codeigniter project on mac but it is showing "The Encrypt library requires the Mcrypt extension." error.I have tried many solutions to install Mcrypt extension but every time i am getting errors.I have tried to install it using homebrew using brew install php5-mcrypt command but getting No available formula with the name "php5-mcrypt" error everytime.Issue is i am new to mac so now I am stuck because i don't know how to solve this issue. Can anyone help me and give me guidance that exactly what should i do to install Mcrypt extension? I am using PHP version 7.2.4 and macOS 10.13: High Sierra (Lobo).
I would recommend you try MacPorts. It's like Homebrew but I've had better luck recently. There is a port for php72-mcrypt if that's the one you are after. There are many others available as well. The MacPorts home page, found here gives instructions for loading MacPorts and also has a list of available ports.
mcrypt has been removed from PHP core since 7.2. To install mcrypt in PHP 7.2, you have to install via PCEL. The command is:
sudo pecl install mcrypt-1.0.1
You might want to read the official installation documentation as well.
For mac users install MAMP pro and select a php version that has mcrypt.
That is to say any version before php 7.2 .
Start the servers and voila you’re good to go.

Composer uses wrong openssl version

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

PHP OpenSSL is missing during composer installation on Windows

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?

Resources