Package Details: php-smbclient 1.0.0-2

Git Clone URL: https://aur.archlinux.org/php-smbclient.git (read-only, click to copy)
Package Base: php-smbclient
Description: PHP bindings for libsmbclient.
Upstream URL: https://github.com/eduardok/libsmbclient-php
Licenses: BSD
Submitter: icewind
Maintainer: icewind
Last Packager: icewind
Votes: 4
Popularity: 0.055642
First Submitted: 2015-09-21 14:32
Last Updated: 2020-05-15 20:28

Latest Comments

kescherAUR commented on 2020-05-14 16:28

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

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

updated to 1.0.0 which has php 7.3 support

stochastix commented on 2018-12-19 05:20

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

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

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?

swalladge commented on 2018-02-07 06:43

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. :)