Smbclient is not installed

Hi all!

Im a newbee in Linux but learned a lot with googling my answers. NextCloud is running really well but I can’t get my NC to connect to a samba share. I installed on a clean server with ContOS 7, Direct Admin, Apache & PHP 7.2. smbclient is installed but i’m not sure I need to do some extra configuring.

I tried to install php-smbclient but yum install php-smbclient gives a “No package php-smbclient available.” Is there anyone who can help me in the right direction?

Many thanks in advance!

Make sure that you’re installing and configuring the right package for the right PHP version. You will find many reports on this forum where users have installed a package for e.g. PHP 7.0 and wondering why it couldn’t be loaded using PHP 7.2. Please use the search function to find related postings.

Thanks for your quick reply! Will check that again.

Just for me to learn a bit more…
If I get the PHP version with:


it gives:
PHP 7.2.29 (cli) (built: Mar 23 2020 16:40:03) ( NTS )

Then i assume i need for php-smbclient?

Please keep in mind, that you need to check the PHP web and cli component. Best would be to keep the both versions in sync. You can check the loaded modules for the PHP cli component executing php -m, for the PHP web component you have to create a php file which contains <?php phpinfo() ?>and load it using a browser.

Ok, im trying to folow you. Do you mean I have to check if the components of PHP web and the PHP CLI components are the same? In that case, yes they are. But on both i don’t see smbclient. Only in the webpage I see smb and smbs as a protocol under Curl.

Ok, you have to make sure that the smbclient module is correctly activated to be loaded.

Thnx for your help so far!

I tried to install smbclient with help of a lot tutorials but none of them work in my situation. I get stranded every time. Tried it with info from but (one of the search results from your google link):

pecl install pecl_http --> pecl: command not found

RPM for Fedora / RHEL / CentOS: php-smbclient --> 0 results

cd libsmbclient-php ; phpize --> phpize: command not found

I definitely lost track (or haven’t even found the right Linux track yet)

Just to be clear, you are running the “manual” installation of NC (unzipped into web folder), not the Docker or snap packages, correct?

Yes, that’s correct

Ok, took me another day of trying and learning… But still no luck.

Now I do understand there is a difference between PHP web and CLI components.

Samba is working but i just cant get it installed in PHP. Also I noticed i have kind of the same problem with OPcache. It is working, but not in PHP.

Anyone who can guide me in the right direction?

I think you meant “CentOS”, therefore you should search for it: