Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Feb 2022 00:01:46 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        Xavier Humbert <xavier@groumpf.org>, ports@freebsd.org
Subject:   Re: php-fpm (8.0) strange error related to smbclient
Message-ID:  <e511d98f-77fb-19b5-358f-49ca3f0adc72@quip.cz>
In-Reply-To: <121050fe-6243-5ec2-3922-8e4c8a7ef936@groumpf.org>
References:  <121050fe-6243-5ec2-3922-8e4c8a7ef936@groumpf.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 04/02/2022 21:20, Xavier Humbert wrote:
> Hi,
> 
> I recently upgraded my whole php stuff from 7.3 to 8.0 via portupgrade
> 
> All went flawlessly. But when I want to start php-fpm, I got this error 
> about which Google knows nothing :
> 
>> [root@numenor php80]# service php-fpm restart
>> Performing sanity check on php-fpm configuration:
>> <br />
>> <b>Fatal error</b>:  Duplicate parameter name $oldstate for function 
>> smbclient_rename() in <b>Unknown</b> on line <b>0</b><br />
> I eventually grepped the whole /usr/local/etc AND /usr/local/www 
> directories for this parameter with no success
> 
> Where the hell does this come from ? Samba, obviously, a grep in 
> /usr/local/lib/php matches in smbclient.so
> 
> Also, libsbmclient-php sources show this parameter twice :
> https://github.com/eduardok/libsmbclient-php/blob/master/smbclient.c#L189
> 
> But how fix this, any idea May I fill a PR ?

This is just a wild guess but I thing there is something wrong with your 
pecl-smbclient extension. The Fatal error is from loading this extension 
at the start of php-fpm and not from calling some function in any PHP 
script.

There is a source code where it is really twice oldstate and twice oldpath
https://github.com/eduardok/libsmbclient-php/blob/master/smbclient.c#L189

ZEND_BEGIN_ARG_INFO(arginfo_smbclient_rename, 0)
	ZEND_ARG_INFO(0, oldstate)
	ZEND_ARG_INFO(0, oldpath)
	ZEND_ARG_INFO(0, oldstate)
	ZEND_ARG_INFO(0, oldpath)
ZEND_END_ARG_INFO()

I am not a C programmer but it seems wrong to me, because PHP function 
smbclient_rename takes 4 different parameters:

smbclient_rename ( resource $state_old, string $uri_old, resource 
$state_new, string $uri_new )

I will expect something like this:

ZEND_BEGIN_ARG_INFO(arginfo_smbclient_rename, 0)
	ZEND_ARG_INFO(0, oldstate)
	ZEND_ARG_INFO(0, oldpath)
	ZEND_ARG_INFO(0, newstate)
	ZEND_ARG_INFO(0, newpath)
ZEND_END_ARG_INFO()

But I don't know if this will fix it or destroy the whole universe.

Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e511d98f-77fb-19b5-358f-49ca3f0adc72>