# Setting path to PEAR for PHP 8.2 after removing old versions

**URL:** <https://forum.virtualmin.com/t/setting-path-to-pear-for-php-8-2-after-removing-old-versions/121199>\
**Category:** Help! (Home for newbies)\
**Created:** [June 16, 2023, 1:29pm UTC](https://forum.virtualmin.com/t/setting-path-to-pear-for-php-8-2-after-removing-old-versions/121199 "2023-06-16T13:29:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GJSchaller](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gjschaller/32/8901_2.png) [@GJSchaller](https://forum.virtualmin.com/u/GJSchaller)\
**Post date:** [June 16, 2023, 1:29pm UTC](https://forum.virtualmin.com/t/setting-path-to-pear-for-php-8-2-after-removing-old-versions/121199/1 "2023-06-16T13:29:04Z")

</div>

| SYSTEM INFORMATION | |
| --- | --- |
| OS type and version | Rocky 9.2 |
| Virtualmin version | 7.7 |

After moving my sites off a cloud provider and onto my own hosted Virtualmin server, I wanted to clean up older versions of PHP so they wouldn’t be a potential risk, and to keep things efficient. I was able to google up how to remove the old versions, and did so without issue.

However, the PHP Pear module for Webmin now claims it is not configured correctly. I reinstalled php-pear, but this reinstalled PHP 8.0 along with it. I uninstalled the 8.0 version, and I can see php82-php-pear 1.10.13-5.el9.remi installed, but it looks like the path to Pear in the Webmin module is not correct. What should the path be, for PHP 8.2?

Thank you!

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [June 16, 2023, 10:11pm UTC](https://forum.virtualmin.com/t/setting-path-to-pear-for-php-8-2-after-removing-old-versions/121199/2 "2023-06-16T22:11:05Z")

</div>

webmin doesn’t show a full path. So it sound like it not in the location of the PATH.  
echo $PATH  
If you type pear in shell do you get a response?

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/2X/6/65fbddcea8aa8164ec101a688bdcae6663a33a73.png)

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/2X/b/b868852822a74ad8611a301579ab57a630180a86.png)

---

<div class="post-metadata">

**Author:** ![GJSchaller](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gjschaller/32/8901_2.png) [@GJSchaller](https://forum.virtualmin.com/u/GJSchaller)\
**Post date:** [June 17, 2023, 1:36pm UTC](https://forum.virtualmin.com/t/setting-path-to-pear-for-php-8-2-after-removing-old-versions/121199/3 "2023-06-17T13:36:57Z")

</div>

```auto
root@webhost:~# echo $PATH
/root/.local/bin:/root/bin:/usr/share/Modules/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
root@webhost:~# pear
bash: pear: command not found
root@webhost:~# 

```

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [June 18, 2023, 12:10am UTC](https://forum.virtualmin.com/t/setting-path-to-pear-for-php-8-2-after-removing-old-versions/121199/4 "2023-06-18T00:10:53Z")

</div>

I guess you need to find out where the binary is and add to PATH

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/2X/7/7c4d21beb4232f7af6ea3e4a139ef2e08483b49e.png)

---

<div class="post-metadata">

**Author:** ![GJSchaller](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gjschaller/32/8901_2.png) [@GJSchaller](https://forum.virtualmin.com/u/GJSchaller)\
**Post date:** [June 19, 2023, 3:04pm UTC](https://forum.virtualmin.com/t/setting-path-to-pear-for-php-8-2-after-removing-old-versions/121199/5 "2023-06-19T15:04:33Z")

</div>

Found it - there was a link from:

/usr/bin/php82-pear

to

/opt/remi/php82/root/usr/bin/pear

Added the latter path to the module, and it’s picking it up now.

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [June 27, 2023, 3:05pm UTC](https://forum.virtualmin.com/t/setting-path-to-pear-for-php-8-2-after-removing-old-versions/121199/6 "2023-06-27T15:05:18Z")

</div>

Closed on June 27, 2023, 3:05pm UTC

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.
