How To Install php-smbclient on Fedora 36

In this tutorial we learn how to install php-smbclient in Fedora 36. php-smbclient is PHP wrapper for libsmbclient

Introduction

In this tutorial we learn how to install php-smbclient on Fedora 36.

What is php-smbclient

smbclient is a PHP extension that uses Samba’s libsmbclient library to provide Samba related functions and ‘smb’ streams to PHP programs.

We can use yum or dnf to install php-smbclient on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install php-smbclient.

Install php-smbclient on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install php-smbclient using dnf by running the following command:

sudo dnf -y install php-smbclient

Install php-smbclient on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install php-smbclient using yum by running the following command:

sudo yum -y install php-smbclient

How To Uninstall php-smbclient on Fedora 36

To uninstall only the php-smbclient package we can use the following command:

sudo dnf remove php-smbclient

php-smbclient Package Contents on Fedora 36

/etc/php-zts.d/40-smbclient.ini
/etc/php.d/40-smbclient.ini
/usr/lib/.build-id
/usr/lib/.build-id/4c
/usr/lib/.build-id/4c/0052b54f0c4832a7863d3c4880c894077964bd
/usr/lib/.build-id/78
/usr/lib/.build-id/78/74544250bf2ce17a28d6ad057a3645d7bd13d9
/usr/lib64/php-zts/modules/smbclient.so
/usr/lib64/php/modules/smbclient.so
/usr/share/doc/pecl/smbclient
/usr/share/doc/pecl/smbclient/README.md
/usr/share/licenses/php-smbclient
/usr/share/licenses/php-smbclient/LICENSE
/var/lib/php/peclxml/php-smbclient.xml

References

Summary

In this tutorial we learn how to install php-smbclient on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).