Skip to content
New issue

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

Homebrew has disabled openssl@1.1 #181

Open
mortenscheel opened this issue Nov 13, 2024 · 10 comments
Open

Homebrew has disabled openssl@1.1 #181

mortenscheel opened this issue Nov 13, 2024 · 10 comments

Comments

@mortenscheel
Copy link

Error: openssl@1.1 has been disabled because it is not supported upstream! It was disabled on 2024-10-24.

How does one install php without it?

@jbcaprell
Copy link

jbcaprell commented Nov 15, 2024

The flag --with-openssl=$(brew --prefix openssl) works for me; that is:

export PHP_CONFIGURE_OPTIONS="--with-iconv=/opt/homebrew/opt/libiconv --with-openssl=$(brew --prefix openssl)"
asdf install php 8.3.13

… works for me without openssl@1.1.

@mortenscheel
Copy link
Author

mortenscheel commented Nov 20, 2024

… works for me without openssl@1.1.

Yeah but if you set PHP_CONFIGURE_OPTIONS yourself, the installer will completely skip the automatic os-based configure options. This is the output of os_based_configure_options on my machine:

--with-gmp=/opt/homebrew/opt/gmp --with-sodium=/opt/homebrew/opt/libsodium --with-freetype-dir=/opt/homebrew/opt/freetype --with-gettext=/opt/homebrew/opt/gettext --with-icu-dir=/opt/homebrew/opt/icu4c@76 --with-webp-dir=/opt/homebrew/opt/webp --with-png-dir=/opt/homebrew/opt/libpng --with-zlib-dir=/opt/homebrew/opt/zlib --with-libzip=/opt/homebrew/opt/libzip --with-readline=/opt/homebrew/opt/readline --with-iconv=/opt/homebrew/opt/libiconv

I don't think most users would want to manage and maintain all those options themselves.

I would prefer if this plugin either changed openssl@1.1 to openssl in the install script, or if that's not possible, allow us to override that specific value with an environment variable.

@jbcaprell
Copy link

… works for me without openssl@1.1.

Yeah but if you set PHP_CONFIGURE_OPTIONS yourself, the installer will completely skip the automatic os-based configure options. This is the output of os_based_configure_options on my machine:

--with-gmp=/opt/homebrew/opt/gmp --with-sodium=/opt/homebrew/opt/libsodium --with-freetype-dir=/opt/homebrew/opt/freetype --with-gettext=/opt/homebrew/opt/gettext --with-icu-dir=/opt/homebrew/opt/icu4c@76 --with-webp-dir=/opt/homebrew/opt/webp --with-png-dir=/opt/homebrew/opt/libpng --with-zlib-dir=/opt/homebrew/opt/zlib --with-libzip=/opt/homebrew/opt/libzip --with-readline=/opt/homebrew/opt/readline --with-iconv=/opt/homebrew/opt/libiconv

I don't think most users would want to manage and maintain all those options themselves.

I would prefer if this plugin either changed openssl@1.1 to openssl in the install script, or if that's not possible, allow us to override that specific value with an environment variable.

Absolutely! My response should be viewed as a band-aid for folks who just want to install PHP and move on with their lives, nothing more.

@watarukura
Copy link

@mortenscheel
Copy link
Author

Yeah that's the issue. I think the best and easiest solution is to allow overriding the openssl version with an environment variable, or simply merging #154 so we can append the configure options.

@MikKuba
Copy link

MikKuba commented Dec 19, 2024

Hi!

I am using PHP 8.0 and now openssl was updated to 3.4
But I need to use openssl@1.1, which I manually install to /usr/local/openssl-1.1 (homebrew is situated /opt/homebrew/..)

In terminal, when i type openssl version, I got OpenSSL 1.1.1u 30 May 2023. That`s OK.

If I dump openssl version in my project, Ive got OpenSSL 3.4.0 22 Oct 2024`

Please, can you tell me, if I can run openssl@1.1 under homebrew PHP 8.0 and how?
Many thanks!!

@mortenscheel
Copy link
Author

@MikKuba you can edit the install script in ~/.asdf/plugins/php/bin/install. Search for openssl_path= and hardcode the path to your installation folder (it should be the folder that contains bin,include,lib and share subfolders). There are 2 local openssl_path variables you have to override.

@MikKuba
Copy link

MikKuba commented Dec 20, 2024

@MikKuba you can edit the install script in ~/.asdf/plugins/php/bin/install. Search for openssl_path= and hardcode the path to your installation folder (it should be the folder that contains bin,include,lib and share subfolders). There are 2 local openssl_path variables you have to override.

@mortenscheel I'm sorry, when I run code ~/.asdf/plugins/php/bin/install, it opens blank file.
After save it's placed in Users\michalkuba\.asdf\plugins\php\bin.

Next, I run brew reinstall php, restart PHP, but nothing changed.
In terminal, openssl version it returns correctly OpenSSL 1.1.1u 30 May 2023

Do you have any other hints for me? Or do you need more information? Let me know.
Thanks a lot!

@brunofunnie
Copy link

brunofunnie commented Dec 26, 2024

Recently I reseted my Macbook (formatted it) and did install PHP with asdf, I did install Brew and it's requirements and I still received this error:

Warning: fopen(): Unable to find the wrapper "https"

Then after reading this post and concatenating some answers I've used this line to install PHP normally.

export PHP_CONFIGURE_OPTIONS="--with-gmp=/opt/homebrew/opt/gmp --with-sodium=/opt/homebrew/opt/libsodium --with-freetype-dir=/opt/homebrew/opt/freetype --with-gettext=/opt/homebrew/opt/gettext --with-icu-dir=/opt/homebrew/opt/icu4c@76 --with-webp-dir=/opt/homebrew/opt/webp --with-png-dir=/opt/homebrew/opt/libpng --with-zlib-dir=/opt/homebrew/opt/zlib --with-libzip=/opt/homebrew/opt/libzip --with-readline=/opt/homebrew/opt/readline --with-iconv=/opt/homebrew/opt/libiconv --with-openssl=$(brew --prefix openssl)"
asdf install php <php.version.here>

@jlarmstrongiv
Copy link

@brunofunnie thank you!! That worked.

I am on an older intel mac, so it looks a little different.

brew install gmp libsodium imagemagick argon2 aspell libunistring libidn2 libnghttp2 openldap rtmpdump curl unixodbc freetds jpeg-turbo libavif gd krb5 libpq libzip tidy-html5 re2c libiconv pkg-config oniguruma libgd

export PATH="/usr/local/opt/bison/bin:$PATH"
export PATH="/usr/local/opt/curl/bin:$PATH"
export PATH="/usr/local/opt/openldap/bin:$PATH"
export PATH="/usr/local/opt/openldap/sbin:$PATH"
export PATH="/usr/local/opt/krb5/bin:$PATH"
export PATH="/usr/local/opt/krb5/sbin:$PATH"
export PATH="/usr/local/opt/libpq/bin:$PATH"
export PATH="/usr/local/opt/libiconv/bin:$PATH"

export PHP_CONFIGURE_OPTIONS="--with-gmp=/usr/local/opt/gmp --with-sodium=/usr/local/opt/libsodium --with-freetype-dir=/usr/local/opt/freetype --with-gettext=/usr/local/opt/gettext --with-icu-dir=/usr/local/opt/icu4c@76 --with-webp-dir=/usr/local/opt/webp --with-png-dir=/usr/local/opt/libpng --with-zlib-dir=/usr/local/opt/zlib --with-libzip=/usr/local/opt/libzip --with-readline=/usr/local/opt/readline --with-iconv=/usr/local/opt/libiconv --with-openssl=$(brew --prefix openssl)"
asdf install php 8.4.2

I had to do a fresh install on the machine, so I couldn't use the old version of openssl@1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants