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

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------hTjq3zqAsEdL701ph8Oiql20
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Misroslav,

I removed SMB support from Nextcoud's config, then was able topkg delete 
php80-pecl-smbclient-1.0.6

Le 2/5/22 00:01, Miroslav Lachman a écrit :
>
> 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
>
I opened a PR on Github

Cheers,

Xavier

-- 
--
Xavier HUMBERT - Unix/Win/MacOSX Sysadmin/Network Engineer
https://www.amdh.fr

--------------hTjq3zqAsEdL701ph8Oiql20
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><font face="monospace">Hi Misroslav,</font></p>
    <p><font face="monospace">I removed SMB support from Nextcoud's
        config, then was able to<span
          style="color:#000000;background-color:#ffffff;"> pkg delete
          php80-pecl-smbclient-1.0.6</span><br>
      </font></p>
    <div class="moz-cite-prefix"><font face="monospace">Le 2/5/22 00:01,
        Miroslav Lachman a écrit :<br>
      </font></div>
    <blockquote type="cite"
      cite="mid:e511d98f-77fb-19b5-358f-49ca3f0adc72@quip.cz"><font
        face="monospace"><br>
        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.
        <br>
      </font>
      <font face="monospace"><br>
        There is a source code where it is really twice oldstate and
        twice oldpath
        <br>
<a class="moz-txt-link-freetext" href="https://github.com/eduardok/libsmbclient-php/blob/master/smbclient.c#L189">https://github.com/eduardok/libsmbclient-php/blob/master/smbclient.c#L189</a>;
        <br>
      </font>
      <font face="monospace"><br>
        ZEND_BEGIN_ARG_INFO(arginfo_smbclient_rename, 0)
        <br>
            ZEND_ARG_INFO(0, oldstate)
        <br>
            ZEND_ARG_INFO(0, oldpath)
        <br>
            ZEND_ARG_INFO(0, oldstate)
        <br>
            ZEND_ARG_INFO(0, oldpath)
        <br>
        ZEND_END_ARG_INFO()
        <br>
      </font>
      <font face="monospace"><br>
        I am not a C programmer but it seems wrong to me, because PHP
        function smbclient_rename takes 4 different parameters:
        <br>
      </font>
      <font face="monospace"><br>
        smbclient_rename ( resource $state_old, string $uri_old,
        resource $state_new, string $uri_new )
        <br>
      </font>
      <font face="monospace"><br>
        I will expect something like this:
        <br>
      </font>
      <font face="monospace"><br>
        ZEND_BEGIN_ARG_INFO(arginfo_smbclient_rename, 0)
        <br>
            ZEND_ARG_INFO(0, oldstate)
        <br>
            ZEND_ARG_INFO(0, oldpath)
        <br>
            ZEND_ARG_INFO(0, newstate)
        <br>
            ZEND_ARG_INFO(0, newpath)
        <br>
        ZEND_END_ARG_INFO()
        <br>
      </font>
      <font face="monospace"><br>
        But I don't know if this will fix it or destroy the whole
        universe.
        <br>
      </font>
      <font face="monospace"><br>
        Miroslav Lachman
        <br>
      </font>
      <font face="monospace"><br>
      </font></blockquote>
    <p><font face="monospace">I opened a PR on Github</font></p>
    <p><font face="monospace">Cheers,</font></p>
    <p><font face="monospace">Xavier<br>
      </font></p>
    <pre class="moz-signature" cols="72">-- 
--
Xavier HUMBERT - Unix/Win/MacOSX Sysadmin/Network Engineer
<a class="moz-txt-link-freetext" href="https://www.amdh.fr">https://www.amdh.fr</a>;
</pre>
  </body>
</html>

--------------hTjq3zqAsEdL701ph8Oiql20--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6e7b5ccb-db15-73f1-fcfa-ef7733a6fee5>