asdf-community / asdf-community/asdf-php

PHP messing with my PATH

Open
#136 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
256
Forks
117
PR merge metrics
No merged PRs in 30d

Description

For some reason, my `PATH` is being messed by PHP and I didn't found anything that could causes this:

```sh
$ echo $PATH
{PATH}:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /home/aledsz/.asdf/installs/php/8.1.9/lib/php/extensions/no-debug-non-zts-20210902/redis.so (/home/aledsz/.asdf/installs/php/8.1.9/lib/php/extensions/no-debug-non-zts-20210902/redis.so: cannot open shared object file: No such file or directory), /home/aledsz/.asdf/installs/php/8.1.9/lib/php/extensions/no-debug-non-zts-20210902/redis.so.so (/home/aledsz/.asdf/installs/php/8.1.9/lib/php/extensions/no-debug-non-zts-20210902/redis.so.so: No such file or directory)) in Unknown on line 0

Warning: Unable to load dynamic library 'imagick.so' (tried: /home/aledsz/.asdf/installs/php/8.1.9/lib/php/extensions/no-debug-non-zts-20210902/imagick.so (/home/aledsz/.asdf/installs/php/8.1.9/lib/php/extensions/no-debug-non-zts-20210902/imagick.so: No such file or directory), /home/aledsz/.asdf/installs/php/8.1.9/lib/php/extensions/no-debug-non-zts-20210902/imagick.so.so (/home/aledsz/.asdf/installs/php/8.1.9/lib/php/extensions/no-debug-non-zts-20210902/imagick.so.so: No such file or directory)) in Unknown on line 0
/home/aledsz/.asdf/installs/php/8.1.9/.composer/vendor/bin
```

Currently I'm using Oh-My-Zsh and I removed the `asdf` plugin and it works flawlessly.
Then I digged into `asdf` plugin and it just checks the folder and loads the `asdf.sh` and `competions/asdf.bash`.

Since it shows PHP errors, I guess it's from `asdf` but I'm not so sure. I'm using PHP 8.1.9 and it's making it worse to work with `PATH` which I can't use it directly from other programming language and I'm trying to not uninstall PHP because I still need to use with my own stuff.

My `php.ini` only adds `xdebug` and it's configurations, I don't even have these extensions installed from `pecl`.

So, do anyone have idea what's going on? I'm not used to asdf code, so I'll need some help/context here.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the asdf plugin entry points mentioned in the report: asdf.sh and completions/asdf.bash. Reproduce the PATH output with PHP 8.1.9, the reported php.ini, and the asdf plugin enabled, then inspect how PHP startup warnings could be emitted during PATH setup. Done means identifying the cause and documenting or fixing the interaction without breaking PHP or asdf initialization.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, shell
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.