asdf-community / asdf-community/asdf-php
MacOS: Unable to find the wrapper "https"
- Dominant language
- Shell
- Stars
- 256
- Forks
- 117
- PR merge metrics
- No merged PRs in 30d
Description
### Provide environment information
```bash
OS:
Darwin My-MacBook-Pro.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:33:00 PDT 2023; root:xnu-10002.41.9~7/RELEASE_ARM64_T6031 arm64
SHELL:
zsh 5.9 (x86_64-apple-darwin23.0)
BASH VERSION:
3.2.57(1)-release
ASDF VERSION:
v0.13.1-0586b37
ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/tyler/.asdf
ASDF_DIR=/Users/tyler/.asdf
ASDF_CONFIG_FILE=/Users/tyler/.asdfrc
ASDF INSTALLED PLUGINS:
elixir https://github.com/asdf-vm/asdf-elixir.git master a4c42e1
erlang https://github.com/asdf-vm/asdf-erlang.git master aaa3ee7
nodejs https://github.com/asdf-vm/asdf-nodejs.git master c5b7c40
php https://github.com/asdf-community/asdf-php.git master 1eaf4de
ruby https://github.com/asdf-vm/asdf-ruby.git master b3d44de
```
### To Reproduce
Run `asdf install php 8.3.1` or `PHP_WITHOUT_PEAR=yes asdf install php 8.3.1`.
### Describe the Bug
Installation appears to error out when trying to install `pear` or `composer` because https is not enabled in `php.ini` during the installation.
When running `asdf install php 8.3.1`, I get the following errors:
```txt
Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /private/var/folders/5_/jsnsc2s51wl08b_htp4xrctr0000gn/T/php-src-php-8.3.1/pear/fetch.php on line 66
Warning: fopen(https://pear.php.net/install-pear-nozlib.phar): Failed to open stream: No such file or directory in /private/var/folders/5_/jsnsc2s51wl08b_htp4xrctr0000gn/T/php-src-php-8.3.1/pear/fetch.php on line 66
Error..
fopen(https://pear.php.net/install-pear-nozlib.phar): Failed to open stream: No such file or directory
make: *** [install-pear] Error 1
```
When running `PHP_WITHOUT_PEAR=yes asdf install php 8.3.1`, I get the following errors:
```txt
Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
Warning: copy(https://getcomposer.org/installer): Failed to open stream: No such file or directory in Command line code on line 1
Warning: hash_file(composer-setup.php): Failed to open stream: No such file or directory in Command line code on line 1
Installer corrupt
Warning: unlink(composer-setup.php): No such file or directory in Command line code on line 1
Could not open input file: composer-setup.php
tyler@My-MacBook-Pro installs %
```
### Expected Behaviour
PHP successfully installs, or fails in a way that indicates a missing dependency before the installation fails on an https request.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing `asdf install php 8.3.1` and `PHP_WITHOUT_PEAR=yes asdf install php 8.3.1` on macOS. Inspect the PHP build configuration and `php.ini`, then trace the PEAR download in `pear/fetch.php` and the Composer download path shown in the errors. Done means PHP installs successfully or reports a clear missing dependency before attempting an HTTPS request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, php, shell
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100