Do SMB share work with PHP > 7.1?

Hello Everyone,
In my Nextcloud instance i have SMB shares (shared from a Windows Server).
They all work very well in Nextcloud 17.0.8 (running on Ubuntu / NGINX) and PHP Version: 7.1.17.

PHP 7.1.17-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: May 5 2018 04:56:28) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright © 1998-2018 Zend Technologies
with Zend OPcache v7.1.17-1+ubuntu18.04.1+deb.sury.org+1, Copyright © 1999-2018, by Zend Technologies

I wanted to upgrade to v19 and for that I need to upgrade PHP to >= 7.2.

No matter what I do and which version of PHP I use, as soon as I update, Nextcloud works except the SMB share (they all become inaccessible).

Did anyone manage to have SMB/CIFS shares working with PHP > 7.1?
I tried 7.2 and 7.3 without success (nextcloud opens and reports PHP new version correctly.
Only the SMB share stop working.

I ensured the smbclient extension was installed to no avail.
Steps:

apt install php7.3 php7.3-common php7.3-cli
apt install php7.3-curl php7.3-mbstring php7.3-bz2 php7.4-readline php7.3-intl

And I edited the NGINX configuration to use 7.3

Then thinking this could be a missing dependency… I also done:

sudo apt install php7.3-amqp php7.3-apcu php7.3-apcu-bc php7.3-ds php7.3-gearman php7.3-geoip php7.3-gmagick php7.3-gnupg php7.3-http php7.3-igbinary php7.3-imagick php7.3-mailparse php7.3-memcache php7.3-memcached php7.3-mongodb php7.3-msgpack php7.3-oauth php7.3-pinba php7.3-propro php7.3-radius php7.3-raphf php7.3-redis php7.3-rrd php7.3-smbclient php7.3-solr php7.3-ssh2 php7.3-stomp php7.3-tideways php7.3-uploadprogress php7.3-uuid php7.3-yac php7.3-yaml php7.3-zmq php7.3-lua php7.3-pcov php7.3-phalcon php7.3-xdebug

Just as a test.
Also I verified there was “extension=smbclient.so”

Nothing I did worked.

I reverted back the VM prior of PHP upgrade so this isn’t urgent but it would be nice to keep the site updated. I use SMB shares heavily and without those I can’t upgrade.

Any hint if you got it working would be much appreciated.

Thank you.

Can you post your used installation guide and your sources for newer php-versions e.g. Nextcloud 18 installation guide (Ubuntu 20.04/18.04) – Carsten Rieger IT-Services

Perhapys you can dist-upgrade to Ubuntu 20.04 LTS and only use packages from this release.

Perhaps this is a problem:
https://packages.ubuntu.com/de/php-smbclient

What is the package in Ubuntu 20.04 LTS (PHP 7.4)?
Ok you use PHP 7.3 . Perhaps no problem with your sources.

Please test php is really installed:

dpkg -l |fgrep php
dpkg -l |fgrep smb

Test on your website:
PHP: phpinfo - Manual

Hello Devnull,
That was a quick answer :slight_smile:

I used this video to see how PHP was updated for Nextcloud (it worked for that gentleman but he had no SMB drives)

It’s in German (and I am not German… but the commands are in English… )

PHP was installed because after the setup, I checked in Nextcloud “Administration->System” and there you can tell which version Nextcloud is using (reported correctly 7.3)

Thanks for your suggestion on dist-upgrade.
I can surely try that and your guide.

Thanks for your help devnull.
You suggestion worked.

I upgraded Ubuntu to 20 LTS
Installed PHP 7.3
Modified the NGINX configuration

Worked like a charm.

Appreciate your help.

1 Like