Setting path to PEAR for PHP 8.2 after removing old versions

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!

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?

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:~# 

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

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.

1 Like

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