Package Base Details: php-smbclient

Git Clone URL: https://aur.archlinux.org/php-smbclient.git (read-only, click to copy)
Submitter: icewind
Maintainer: JstKddng
Last Packager: JstKddng
Votes: 5
Popularity: 0.010038
First Submitted: 2015-09-21 14:32 (UTC)
Last Updated: 2023-09-05 02:56 (UTC)

Latest Comments

kescherAUR commented on 2020-05-14 16:28 (UTC)

Since this package works fine under armv7h architecture, I suggest applying this git diff:

diff --git a/.SRCINFO b/.SRCINFO
index f06b6ab..fb0de11 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,6 +5,7 @@ pkgbase = php-smbclient
        url = https://github.com/eduardok/libsmbclient-php
        arch = i686
        arch = x86_64
+       arch = armv7h
        license = BSD
        depends = php
        depends = smbclient
diff --git a/PKGBUILD b/PKGBUILD
index 8d424f7..726c9ff 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@ _extname=smbclient
 pkgver=1.0.0
 pkgrel=2
 pkgdesc="PHP bindings for libsmbclient."
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'armv7h')
 url="https://github.com/eduardok/libsmbclient-php"
 license=('BSD')
 depends=('php' 'smbclient')

mario-kr commented on 2019-12-13 23:05 (UTC)

Hi, the current version of this package does not seem to work with the php 7.4 release.

The error message is:

PHP Warning:  PHP Startup: Unable to load dynamic library 'smbclient.so' (tried: /usr/lib/php/modules/smbclient.so (/usr/lib/php/modules/smbclient.so: undefined symbol: php_error_docref0), /usr/lib/php/modules/smbclient.so.so (/usr/lib/php/modules/smbclient.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

I built this extension from source on my machine with php7.4 installed, and it worked again, so I guess freshly rebuilding this package with the updated php version should suffice. I didn't test for regressions regarding php7.3, but I guess people upgrade AUR-Packages later or at the same time as official packages either way.

icewind commented on 2018-12-25 20:20 (UTC)

updated to 1.0.0 which has php 7.3 support

stochastix commented on 2018-12-19 05:20 (UTC) (edited on 2018-12-19 05:25 (UTC) by stochastix)

Thanks columbariu_s, If anyone wants commands and locations. Make a directory to clone git repos to if you don't have one and run the following commands as regular user.

mkdir ~/myGitRepos
cd myGitRepos
git clone https://github.com/eduardok/libsmbclient-php.git
cd libsmbclient-php
git checkout remi-php73
phpize
./configure
make
sudo cp modules/smbclient.so /usr/lib/php/modules/

Either inside /etc/php/php.ini or in /etc/php/conf.d/smbclient.ini have the line extension=smbclient.so

then,

sudo systemctl restart httpd.service

and it should work now! FYI, I didn't need to go to that specific commit, and it compiles and seemed to work fine for me.

columbariu_s commented on 2018-12-19 02:30 (UTC) (edited on 2018-12-19 02:45 (UTC) by columbariu_s)

I had the same problem and needed this package for nextcloud (version 15) to connect to smb shares. I cloned the repo from github (https://github.com/eduardok/libsmbclient-php.git) and used the remi-php73 branch at the commit (fix for PHP 7.3 because of API change, and array_init always succeeds).

git checkout -b remi-php73 596eaa47642633a4dc80f26f6bfbd95b536e57d1

From this state I built it like described in the README and copied the smbclient.so to the php-module folder, replacing the old one and that worked for me. My guess would be something broke with php7.3.

Tojeski commented on 2018-12-11 22:13 (UTC)

Cant seem to make it at the moment,

php-smbclient/src/libsmbclient-php-0.9.0/smbclient.c:2034:6: note: in expansion of macro ‘array_init’ if (array_init(return_value) != SUCCESS) { ^~~~~~~~~~ make: *** [Makefile:194: smbclient.lo] Error 1

Not sure what the cause it, configure runs fine, any ideas?

<deleted-account> commented on 2018-02-07 06:43 (UTC)

Just a heads up - if you get the following when you run php after upgrading:

PHP Warning:  PHP Startup: smbclient: Unable to initialize module

Then you need to rebuild this package against the php version running on your system. :)