php 32 bit (arm) filemtime issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

php 32 bit (arm) filemtime issue

Boris Ribalkin
Hi All,

I am facing an issue with running file:scan on arm:

filemtime(): stat failed

Looks like the reason is filemtime [1] is not working for files over 2G on 32 bit php [2]

Fixing function according to php website comment solved the problem:
  exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));

I am sure that worked fine in past with older owncloud/php versions on the same hardware.

Is there something I am missing or this never worked on php (32bit) / arm?
Or is it possible to have some if, like:

if (PHP_INT_SIZE === 4)
   return exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));
else
   return filemtime($this->getSourcePath($path));


I cannot upgrade php to 64 bit on arm board as there there is no such thing yet as arm64 or at least not popular enough on single board computers yet.

[2] https://github.com/owncloud/core/blob/master/lib/private/files/storage/local.php#L159

My system:
ownCloud version 8.0.4
PHP Version => 5.6.9
System => Linux cubietruck 3.4.79-sun7i #13 SMP PREEMPT Thu Jul 3 06:34:55 CST 2014 armv7l
Configure Command =>  './configure'  '--enable-fpm' '--with-pgsql' '--with-pdo-pgsql' '--enable-opcache' '--prefix' '--with-config-file-path=/root/build/install/config' '--with-gd' '--enable-zip' '--with-zlib' '--with-curl' '--with-readline' '--with-ldap' '--with-ldap-sasl' '--with-libdir=lib/arm-linux-gnueabihf' '--enable-mbstring'

Thank you

--
Boris Rybalkin
[hidden email]

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: php 32 bit (arm) filemtime issue

hoorna
Hi,

I am also facing an issue with file:scan. While running that command I am receiving many, many, many times the next message:

         stat: invalid option -- 'c'
         BusyBox v1.16.1 (2015-06-29 18:12:44 CST) multi-call binary.

         Usage: stat [OPTIONS] FILE...

         Display file (default) or filesystem status

         Options:
                 -f      Display filesystem status
                 -L      Follow links
                 -t      Display info in terse form


I am running OwnCloud on a Synology Diskstation. Synology implemented the Busybox shell on their Diskstations.

Cheers,
Alfred van Hoorn


Op 10 sep. 2015 om 23:07 heeft Boris Ribalkin <[hidden email]> het volgende geschreven:

Hi All,

I am facing an issue with running file:scan on arm:

filemtime(): stat failed

Looks like the reason is filemtime [1] is not working for files over 2G on 32 bit php [2]

Fixing function according to php website comment solved the problem:
  exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));

I am sure that worked fine in past with older owncloud/php versions on the same hardware.

Is there something I am missing or this never worked on php (32bit) / arm?
Or is it possible to have some if, like:

if (PHP_INT_SIZE === 4)
   return exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));
else
   return filemtime($this->getSourcePath($path));


I cannot upgrade php to 64 bit on arm board as there there is no such thing yet as arm64 or at least not popular enough on single board computers yet.

[2] https://github.com/owncloud/core/blob/master/lib/private/files/storage/local.php#L159

My system:
ownCloud version 8.0.4
PHP Version => 5.6.9
System => Linux cubietruck 3.4.79-sun7i #13 SMP PREEMPT Thu Jul 3 06:34:55 CST 2014 armv7l
Configure Command =>  './configure'  '--enable-fpm' '--with-pgsql' '--with-pdo-pgsql' '--enable-opcache' '--prefix' '--with-config-file-path=/root/build/install/config' '--with-gd' '--enable-zip' '--with-zlib' '--with-curl' '--with-readline' '--with-ldap' '--with-ldap-sasl' '--with-libdir=lib/arm-linux-gnueabihf' '--enable-mbstring'

Thank you

--
Boris Rybalkin
[hidden email]
_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: php 32 bit (arm) filemtime issue

Chris-3
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: php 32 bit (arm) filemtime issue

Boris Ribalkin

Right, I just wanted to know if it is valid issue to submit before I do it.

Here is the issue:
https://github.com/owncloud/core/issues/18971

Thank you.

On Sep 11, 2015 08:06, "Chris" <[hidden email]> wrote:
Hi,

you both probably want to report this directly to the bugtracker:


https://github.com/owncloud/core/blob/master/CONTRIBUTING.md#short-version

where such issues are tracked.



--
View this message in context: http://owncloud.10557.n7.nabble.com/php-32-bit-arm-filemtime-issue-tp15778p15780.html
Sent from the Developers mailing list archive at Nabble.com.
_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: php 32 bit (arm) filemtime issue

Boris Ribalkin
In reply to this post by hoorna

Alfred,

Looks like you may try free bsd option (according to php website)

On FreeBSD:
$mtime = exec ('stat -f %m '. escapeshellarg ($path));

On Sep 11, 2015 07:42, "Alfred van Hoorn" <[hidden email]> wrote:
Hi,

I am also facing an issue with file:scan. While running that command I am receiving many, many, many times the next message:

         stat: invalid option -- 'c'
         BusyBox v1.16.1 (2015-06-29 18:12:44 CST) multi-call binary.

         Usage: stat [OPTIONS] FILE...

         Display file (default) or filesystem status

         Options:
                 -f      Display filesystem status
                 -L      Follow links
                 -t      Display info in terse form


I am running OwnCloud on a Synology Diskstation. Synology implemented the Busybox shell on their Diskstations.

Cheers,
Alfred van Hoorn


Op 10 sep. 2015 om 23:07 heeft Boris Ribalkin <[hidden email]> het volgende geschreven:

Hi All,

I am facing an issue with running file:scan on arm:

filemtime(): stat failed

Looks like the reason is filemtime [1] is not working for files over 2G on 32 bit php [2]

Fixing function according to php website comment solved the problem:
  exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));

I am sure that worked fine in past with older owncloud/php versions on the same hardware.

Is there something I am missing or this never worked on php (32bit) / arm?
Or is it possible to have some if, like:

if (PHP_INT_SIZE === 4)
   return exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));
else
   return filemtime($this->getSourcePath($path));


I cannot upgrade php to 64 bit on arm board as there there is no such thing yet as arm64 or at least not popular enough on single board computers yet.

[2] https://github.com/owncloud/core/blob/master/lib/private/files/storage/local.php#L159

My system:
ownCloud version 8.0.4
PHP Version => 5.6.9
System => Linux cubietruck 3.4.79-sun7i #13 SMP PREEMPT Thu Jul 3 06:34:55 CST 2014 armv7l
Configure Command =>  './configure'  '--enable-fpm' '--with-pgsql' '--with-pdo-pgsql' '--enable-opcache' '--prefix' '--with-config-file-path=/root/build/install/config' '--with-gd' '--enable-zip' '--with-zlib' '--with-curl' '--with-readline' '--with-ldap' '--with-ldap-sasl' '--with-libdir=lib/arm-linux-gnueabihf' '--enable-mbstring'

Thank you

--
Boris Rybalkin
[hidden email]
_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel


_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: php 32 bit (arm) filemtime issue

hoorna
H Boris,
 
I don't know what you mean by this. Please help.
 
Alfred 
 
------ Origineel bericht ------
Van: "Boris Ribalkin" <[hidden email]>
Aan: "List for Developers of ownCloud" <[hidden email]>
Verzonden: 11-9-2015 10:18:09
Onderwerp: Re: [owncloud-devel] php 32 bit (arm) filemtime issue
 

Alfred,

Looks like you may try free bsd option (according to php website)

On FreeBSD:
$mtime = exec ('stat -f %m '. escapeshellarg ($path));

On Sep 11, 2015 07:42, "Alfred van Hoorn" <[hidden email]> wrote:
Hi,

I am also facing an issue with file:scan. While running that command I am receiving many, many, many times the next message:

         stat: invalid option -- 'c'
         BusyBox v1.16.1 (2015-06-29 18:12:44 CST) multi-call binary.

         Usage: stat [OPTIONS] FILE...

         Display file (default) or filesystem status

         Options:
                 -f      Display filesystem status
                 -L      Follow links
                 -t      Display info in terse form


I am running OwnCloud on a Synology Diskstation. Synology implemented the Busybox shell on their Diskstations.

Cheers,
Alfred van Hoorn


Op 10 sep. 2015 om 23:07 heeft Boris Ribalkin <[hidden email]> het volgende geschreven:

Hi All,

I am facing an issue with running file:scan on arm:

filemtime(): stat failed

Looks like the reason is filemtime [1] is not working for files over 2G on 32 bit php [2]

Fixing function according to php website comment solved the problem:
  exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));

I am sure that worked fine in past with older owncloud/php versions on the same hardware.

Is there something I am missing or this never worked on php (32bit) / arm?
Or is it possible to have some if, like:

if (PHP_INT_SIZE === 4)
   return exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));
else
   return filemtime($this->getSourcePath($path));


I cannot upgrade php to 64 bit on arm board as there there is no such thing yet as arm64 or at least not popular enough on single board computers yet.

[2] https://github.com/owncloud/core/blob/master/lib/private/files/storage/local.php#L159

My system:
ownCloud version 8.0.4
PHP Version => 5.6.9
System => Linux cubietruck 3.4.79-sun7i #13 SMP PREEMPT Thu Jul 3 06:34:55 CST 2014 armv7l
Configure Command =>  './configure'  '--enable-fpm' '--with-pgsql' '--with-pdo-pgsql' '--enable-opcache' '--prefix' '--with-config-file-path=/root/build/install/config' '--with-gd' '--enable-zip' '--with-zlib' '--with-curl' '--with-readline' '--with-ldap' '--with-ldap-sasl' '--with-libdir=lib/arm-linux-gnueabihf' '--enable-mbstring'

Thank you

--
Boris Rybalkin
[hidden email]
_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel


_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: php 32 bit (arm) filemtime issue

Boris Ribalkin

Sorry, I thought you also applied the fix from php website. If you did not and this is your original error message then probably you are facing a bit different issue because filemtime owncloud function right now does not use stat Linux app.

But anyway your error tells that stat app you have does not support -c option. Try running 'stat --help' in your server shell.

On Sep 11, 2015 13:58, "Alfred van Hoorn" <[hidden email]> wrote:
H Boris,
 
I don't know what you mean by this. Please help.
 
Alfred 
 
------ Origineel bericht ------
Van: "Boris Ribalkin" <[hidden email]>
Aan: "List for Developers of ownCloud" <[hidden email]>
Verzonden: 11-9-2015 10:18:09
Onderwerp: Re: [owncloud-devel] php 32 bit (arm) filemtime issue
 

Alfred,

Looks like you may try free bsd option (according to php website)

On FreeBSD:
$mtime = exec ('stat -f %m '. escapeshellarg ($path));

On Sep 11, 2015 07:42, "Alfred van Hoorn" <[hidden email]> wrote:
Hi,

I am also facing an issue with file:scan. While running that command I am receiving many, many, many times the next message:

         stat: invalid option -- 'c'
         BusyBox v1.16.1 (2015-06-29 18:12:44 CST) multi-call binary.

         Usage: stat [OPTIONS] FILE...

         Display file (default) or filesystem status

         Options:
                 -f      Display filesystem status
                 -L      Follow links
                 -t      Display info in terse form


I am running OwnCloud on a Synology Diskstation. Synology implemented the Busybox shell on their Diskstations.

Cheers,
Alfred van Hoorn


Op 10 sep. 2015 om 23:07 heeft Boris Ribalkin <[hidden email]> het volgende geschreven:

Hi All,

I am facing an issue with running file:scan on arm:

filemtime(): stat failed

Looks like the reason is filemtime [1] is not working for files over 2G on 32 bit php [2]

Fixing function according to php website comment solved the problem:
  exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));

I am sure that worked fine in past with older owncloud/php versions on the same hardware.

Is there something I am missing or this never worked on php (32bit) / arm?
Or is it possible to have some if, like:

if (PHP_INT_SIZE === 4)
   return exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));
else
   return filemtime($this->getSourcePath($path));


I cannot upgrade php to 64 bit on arm board as there there is no such thing yet as arm64 or at least not popular enough on single board computers yet.

[2] https://github.com/owncloud/core/blob/master/lib/private/files/storage/local.php#L159

My system:
ownCloud version 8.0.4
PHP Version => 5.6.9
System => Linux cubietruck 3.4.79-sun7i #13 SMP PREEMPT Thu Jul 3 06:34:55 CST 2014 armv7l
Configure Command =>  './configure'  '--enable-fpm' '--with-pgsql' '--with-pdo-pgsql' '--enable-opcache' '--prefix' '--with-config-file-path=/root/build/install/config' '--with-gd' '--enable-zip' '--with-zlib' '--with-curl' '--with-readline' '--with-ldap' '--with-ldap-sasl' '--with-libdir=lib/arm-linux-gnueabihf' '--enable-mbstring'

Thank you

--
Boris Rybalkin
[hidden email]
_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel


_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel


_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: php 32 bit (arm) filemtime issue

Boris Ribalkin
Alfred,

Looks like latest busybox has proper stat app:


stat

stat [OPTIONS] FILE...

Display file (default) or filesystem status

Options:

        -c fmt  Use the specified format
        -f      Display filesystem status
        -L      Dereference links
        -t      Display info in terse form


On Fri, Sep 11, 2015 at 2:54 PM, Boris Ribalkin <[hidden email]> wrote:

Sorry, I thought you also applied the fix from php website. If you did not and this is your original error message then probably you are facing a bit different issue because filemtime owncloud function right now does not use stat Linux app.

But anyway your error tells that stat app you have does not support -c option. Try running 'stat --help' in your server shell.

On Sep 11, 2015 13:58, "Alfred van Hoorn" <[hidden email]> wrote:
H Boris,
 
I don't know what you mean by this. Please help.
 
Alfred 
 
------ Origineel bericht ------
Van: "Boris Ribalkin" <[hidden email]>
Aan: "List for Developers of ownCloud" <[hidden email]>
Verzonden: 11-9-2015 10:18:09
Onderwerp: Re: [owncloud-devel] php 32 bit (arm) filemtime issue
 

Alfred,

Looks like you may try free bsd option (according to php website)

On FreeBSD:
$mtime = exec ('stat -f %m '. escapeshellarg ($path));

On Sep 11, 2015 07:42, "Alfred van Hoorn" <[hidden email]> wrote:
Hi,

I am also facing an issue with file:scan. While running that command I am receiving many, many, many times the next message:

         stat: invalid option -- 'c'
         BusyBox v1.16.1 (2015-06-29 18:12:44 CST) multi-call binary.

         Usage: stat [OPTIONS] FILE...

         Display file (default) or filesystem status

         Options:
                 -f      Display filesystem status
                 -L      Follow links
                 -t      Display info in terse form


I am running OwnCloud on a Synology Diskstation. Synology implemented the Busybox shell on their Diskstations.

Cheers,
Alfred van Hoorn


Op 10 sep. 2015 om 23:07 heeft Boris Ribalkin <[hidden email]> het volgende geschreven:

Hi All,

I am facing an issue with running file:scan on arm:

filemtime(): stat failed

Looks like the reason is filemtime [1] is not working for files over 2G on 32 bit php [2]

Fixing function according to php website comment solved the problem:
  exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));

I am sure that worked fine in past with older owncloud/php versions on the same hardware.

Is there something I am missing or this never worked on php (32bit) / arm?
Or is it possible to have some if, like:

if (PHP_INT_SIZE === 4)
   return exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));
else
   return filemtime($this->getSourcePath($path));


I cannot upgrade php to 64 bit on arm board as there there is no such thing yet as arm64 or at least not popular enough on single board computers yet.

[2] https://github.com/owncloud/core/blob/master/lib/private/files/storage/local.php#L159

My system:
ownCloud version 8.0.4
PHP Version => 5.6.9
System => Linux cubietruck 3.4.79-sun7i #13 SMP PREEMPT Thu Jul 3 06:34:55 CST 2014 armv7l
Configure Command =>  './configure'  '--enable-fpm' '--with-pgsql' '--with-pdo-pgsql' '--enable-opcache' '--prefix' '--with-config-file-path=/root/build/install/config' '--with-gd' '--enable-zip' '--with-zlib' '--with-curl' '--with-readline' '--with-ldap' '--with-ldap-sasl' '--with-libdir=lib/arm-linux-gnueabihf' '--enable-mbstring'

Thank you

--
Boris Rybalkin
[hidden email]
_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel


_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel




--
Boris Rybalkin
[hidden email]

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: php 32 bit (arm) filemtime issue

hoorna
Boris,

Indeed your issue is different from the issue I have. And your are also right that my issue had to do with the verstond of Busybox.

The version of Busybox whIch Synology uses on DiskStations (latest firmware)  is 1.16.1. This is a rather old version of Busybox but it is on a DiskStation  hardly impossible to upgrade Busybox to a newer version without creating problems with operating of this NAS.

I have two questions:
1) I don't see an solution for my issue with occ file:scan. Am I right?
2) Do you know if the messages I get from file:scan are warnings or are error-messages? In other words, is file:scan on my box operating as supposed or are there things going wrong?

Cheers.



Op 11 sep. 2015 om 23:08 heeft Boris Ribalkin <[hidden email]> het volgende geschreven:

Alfred,

Looks like latest busybox has proper stat app:


stat

stat [OPTIONS] FILE...

Display file (default) or filesystem status

Options:

        -c fmt  Use the specified format
        -f      Display filesystem status
        -L      Dereference links
        -t      Display info in terse form


On Fri, Sep 11, 2015 at 2:54 PM, Boris Ribalkin <[hidden email]> wrote:

Sorry, I thought you also applied the fix from php website. If you did not and this is your original error message then probably you are facing a bit different issue because filemtime owncloud function right now does not use stat Linux app.

But anyway your error tells that stat app you have does not support -c option. Try running 'stat --help' in your server shell.

On Sep 11, 2015 13:58, "Alfred van Hoorn" <[hidden email]> wrote:
H Boris,
 
I don't know what you mean by this. Please help.
 
Alfred 
 
------ Origineel bericht ------
Van: "Boris Ribalkin" <[hidden email]>
Aan: "List for Developers of ownCloud" <[hidden email]>
Verzonden: 11-9-2015 10:18:09
Onderwerp: Re: [owncloud-devel] php 32 bit (arm) filemtime issue
 

Alfred,

Looks like you may try free bsd option (according to php website)

On FreeBSD:
$mtime = exec ('stat -f %m '. escapeshellarg ($path));

On Sep 11, 2015 07:42, "Alfred van Hoorn" <[hidden email]> wrote:
Hi,

I am also facing an issue with file:scan. While running that command I am receiving many, many, many times the next message:

         stat: invalid option -- 'c'
         BusyBox v1.16.1 (2015-06-29 18:12:44 CST) multi-call binary.

         Usage: stat [OPTIONS] FILE...

         Display file (default) or filesystem status

         Options:
                 -f      Display filesystem status
                 -L      Follow links
                 -t      Display info in terse form


I am running OwnCloud on a Synology Diskstation. Synology implemented the Busybox shell on their Diskstations.

Cheers,
Alfred van Hoorn


Op 10 sep. 2015 om 23:07 heeft Boris Ribalkin <[hidden email]> het volgende geschreven:

Hi All,

I am facing an issue with running file:scan on arm:

filemtime(): stat failed

Looks like the reason is filemtime [1] is not working for files over 2G on 32 bit php [2]

Fixing function according to php website comment solved the problem:
  exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));

I am sure that worked fine in past with older owncloud/php versions on the same hardware.

Is there something I am missing or this never worked on php (32bit) / arm?
Or is it possible to have some if, like:

if (PHP_INT_SIZE === 4)
   return exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));
else
   return filemtime($this->getSourcePath($path));


I cannot upgrade php to 64 bit on arm board as there there is no such thing yet as arm64 or at least not popular enough on single board computers yet.

[2] https://github.com/owncloud/core/blob/master/lib/private/files/storage/local.php#L159

My system:
ownCloud version 8.0.4
PHP Version => 5.6.9
System => Linux cubietruck 3.4.79-sun7i #13 SMP PREEMPT Thu Jul 3 06:34:55 CST 2014 armv7l
Configure Command =>  './configure'  '--enable-fpm' '--with-pgsql' '--with-pdo-pgsql' '--enable-opcache' '--prefix' '--with-config-file-path=/root/build/install/config' '--with-gd' '--enable-zip' '--with-zlib' '--with-curl' '--with-readline' '--with-ldap' '--with-ldap-sasl' '--with-libdir=lib/arm-linux-gnueabihf' '--enable-mbstring'

Thank you

--
Boris Rybalkin
[hidden email]
_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel


_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel




--
Boris Rybalkin
[hidden email]

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: php 32 bit (arm) filemtime issue

Bernhard Posselt-2
Hi guys,

can you please really move this to github? ;)

On 09/12/2015 11:40 AM, Alfred van Hoorn wrote:

> Boris,
>
> Indeed your issue is different from the issue I have. And your are also right that my issue had to do with the verstond of Busybox.
>
> The version of Busybox whIch Synology uses on DiskStations (latest firmware)  is 1.16.1. This is a rather old version of Busybox but it is on a DiskStation  hardly impossible to upgrade Busybox to a newer version without creating problems with operating of this NAS.
>
> I have two questions:
> 1) I don't see an solution for my issue with occ file:scan. Am I right?
> 2) Do you know if the messages I get from file:scan are warnings or are error-messages? In other words, is file:scan on my box operating as supposed or are there things going wrong?
>
> Cheers.
>
>
>
>> Op 11 sep. 2015 om 23:08 heeft Boris Ribalkin <[hidden email]> het volgende geschreven:
>>
>> Alfred,
>>
>> Looks like latest busybox has proper stat app:
>>
>> http://www.busybox.net/downloads/BusyBox.html
>>
>> stat
>> stat [OPTIONS] FILE...
>>
>> Display file (default) or filesystem status
>>
>> Options:
>>
>>         -c fmt  Use the specified format
>>         -f      Display filesystem status
>>         -L      Dereference links
>>         -t      Display info in terse form
>>
>>
>>> On Fri, Sep 11, 2015 at 2:54 PM, Boris Ribalkin <[hidden email]> wrote:
>>> Sorry, I thought you also applied the fix from php website. If you did not and this is your original error message then probably you are facing a bit different issue because filemtime owncloud function right now does not use stat Linux app.
>>>
>>> But anyway your error tells that stat app you have does not support -c option. Try running 'stat --help' in your server shell.
>>>> On Sep 11, 2015 13:58, "Alfred van Hoorn" <[hidden email]> wrote:
>>>> H Boris,
>>>>  
>>>> I don't know what you mean by this. Please help.
>>>>  
>>>> Alfred
>>>>  
>>>> ------ Origineel bericht ------
>>>> Van: "Boris Ribalkin" <[hidden email]>
>>>> Aan: "List for Developers of ownCloud" <[hidden email]>
>>>> Verzonden: 11-9-2015 10:18:09
>>>> Onderwerp: Re: [owncloud-devel] php 32 bit (arm) filemtime issue
>>>>  
>>>>> Alfred,
>>>>>
>>>>> Looks like you may try free bsd option (according to php website)
>>>>>
>>>>> On FreeBSD:
>>>>> $mtime = exec ('stat -f %m '. escapeshellarg ($path));
>>>>>
>>>>> On Sep 11, 2015 07:42, "Alfred van Hoorn" <[hidden email]> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I am also facing an issue with file:scan. While running that command I am receiving many, many, many times the next message:
>>>>>>
>>>>>>          stat: invalid option -- 'c'
>>>>>>          BusyBox v1.16.1 (2015-06-29 18:12:44 CST) multi-call binary.
>>>>>>
>>>>>>          Usage: stat [OPTIONS] FILE...
>>>>>>
>>>>>>          Display file (default) or filesystem status
>>>>>>
>>>>>>          Options:
>>>>>>                  -f      Display filesystem status
>>>>>>                  -L      Follow links
>>>>>>                  -t      Display info in terse form
>>>>>>
>>>>>> I am running OwnCloud on a Synology Diskstation. Synology implemented the Busybox shell on their Diskstations.
>>>>>>
>>>>>> Cheers,
>>>>>> Alfred van Hoorn
>>>>>>
>>>>>>
>>>>>>> Op 10 sep. 2015 om 23:07 heeft Boris Ribalkin <[hidden email]> het volgende geschreven:
>>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> I am facing an issue with running file:scan on arm:
>>>>>>>
>>>>>>> filemtime(): stat failed
>>>>>>>
>>>>>>> Looks like the reason is filemtime [1] is not working for files over 2G on 32 bit php [2]
>>>>>>>
>>>>>>> Fixing function according to php website comment solved the problem:
>>>>>>>   exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));
>>>>>>>
>>>>>>> I am sure that worked fine in past with older owncloud/php versions on the same hardware.
>>>>>>>
>>>>>>> Is there something I am missing or this never worked on php (32bit) / arm?
>>>>>>> Or is it possible to have some if, like:
>>>>>>>
>>>>>>> if (PHP_INT_SIZE === 4)
>>>>>>>    return exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));
>>>>>>> else
>>>>>>>    return filemtime($this->getSourcePath($path));
>>>>>>>
>>>>>>>
>>>>>>> I cannot upgrade php to 64 bit on arm board as there there is no such thing yet as arm64 or at least not popular enough on single board computers yet.
>>>>>>>
>>>>>>> [1] http://php.net/manual/en/function.filemtime.php#68814
>>>>>>> [2] https://github.com/owncloud/core/blob/master/lib/private/files/storage/local.php#L159
>>>>>>>
>>>>>>> My system:
>>>>>>> ownCloud version 8.0.4
>>>>>>> PHP Version => 5.6.9
>>>>>>> System => Linux cubietruck 3.4.79-sun7i #13 SMP PREEMPT Thu Jul 3 06:34:55 CST 2014 armv7l
>>>>>>> Configure Command =>  './configure'  '--enable-fpm' '--with-pgsql' '--with-pdo-pgsql' '--enable-opcache' '--prefix' '--with-config-file-path=/root/build/install/config' '--with-gd' '--enable-zip' '--with-zlib' '--with-curl' '--with-readline' '--with-ldap' '--with-ldap-sasl' '--with-libdir=lib/arm-linux-gnueabihf' '--enable-mbstring'
>>>>>>>
>>>>>>> Thank you
>>>>>>>
>>>>>>> --
>>>>>>> Boris Rybalkin
>>>>>>> [hidden email]
>>>>>>> _______________________________________________
>>>>>>> Devel mailing list
>>>>>>> [hidden email]
>>>>>>> http://mailman.owncloud.org/mailman/listinfo/devel
>>>>>> _______________________________________________
>>>>>> Devel mailing list
>>>>>> [hidden email]
>>>>>> http://mailman.owncloud.org/mailman/listinfo/devel
>>>> _______________________________________________
>>>> Devel mailing list
>>>> [hidden email]
>>>> http://mailman.owncloud.org/mailman/listinfo/devel
>>
>>
>> --
>> Boris Rybalkin
>> [hidden email]
>
>
> _______________________________________________
> Devel mailing list
> [hidden email]
> http://mailman.owncloud.org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: php 32 bit (arm) filemtime issue

Boris Ribalkin

Alfred,

Could you create separate issue and remove your comment from my issue. I am happy to post my comments regarding your problem to github.

Thank you.

On Sep 12, 2015 11:30, "Bernhard Posselt" <[hidden email]> wrote:
Hi guys,

can you please really move this to github? ;)

On 09/12/2015 11:40 AM, Alfred van Hoorn wrote:
> Boris,
>
> Indeed your issue is different from the issue I have. And your are also right that my issue had to do with the verstond of Busybox.
>
> The version of Busybox whIch Synology uses on DiskStations (latest firmware)  is 1.16.1. This is a rather old version of Busybox but it is on a DiskStation  hardly impossible to upgrade Busybox to a newer version without creating problems with operating of this NAS.
>
> I have two questions:
> 1) I don't see an solution for my issue with occ file:scan. Am I right?
> 2) Do you know if the messages I get from file:scan are warnings or are error-messages? In other words, is file:scan on my box operating as supposed or are there things going wrong?
>
> Cheers.
>
>
>
>> Op 11 sep. 2015 om 23:08 heeft Boris Ribalkin <[hidden email]> het volgende geschreven:
>>
>> Alfred,
>>
>> Looks like latest busybox has proper stat app:
>>
>> http://www.busybox.net/downloads/BusyBox.html
>>
>> stat
>> stat [OPTIONS] FILE...
>>
>> Display file (default) or filesystem status
>>
>> Options:
>>
>>         -c fmt  Use the specified format
>>         -f      Display filesystem status
>>         -L      Dereference links
>>         -t      Display info in terse form
>>
>>
>>> On Fri, Sep 11, 2015 at 2:54 PM, Boris Ribalkin <[hidden email]> wrote:
>>> Sorry, I thought you also applied the fix from php website. If you did not and this is your original error message then probably you are facing a bit different issue because filemtime owncloud function right now does not use stat Linux app.
>>>
>>> But anyway your error tells that stat app you have does not support -c option. Try running 'stat --help' in your server shell.
>>>> On Sep 11, 2015 13:58, "Alfred van Hoorn" <[hidden email]> wrote:
>>>> H Boris,
>>>>
>>>> I don't know what you mean by this. Please help.
>>>>
>>>> Alfred
>>>>
>>>> ------ Origineel bericht ------
>>>> Van: "Boris Ribalkin" <[hidden email]>
>>>> Aan: "List for Developers of ownCloud" <[hidden email]>
>>>> Verzonden: 11-9-2015 10:18:09
>>>> Onderwerp: Re: [owncloud-devel] php 32 bit (arm) filemtime issue
>>>>
>>>>> Alfred,
>>>>>
>>>>> Looks like you may try free bsd option (according to php website)
>>>>>
>>>>> On FreeBSD:
>>>>> $mtime = exec ('stat -f %m '. escapeshellarg ($path));
>>>>>
>>>>> On Sep 11, 2015 07:42, "Alfred van Hoorn" <[hidden email]> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I am also facing an issue with file:scan. While running that command I am receiving many, many, many times the next message:
>>>>>>
>>>>>>          stat: invalid option -- 'c'
>>>>>>          BusyBox v1.16.1 (2015-06-29 18:12:44 CST) multi-call binary.
>>>>>>
>>>>>>          Usage: stat [OPTIONS] FILE...
>>>>>>
>>>>>>          Display file (default) or filesystem status
>>>>>>
>>>>>>          Options:
>>>>>>                  -f      Display filesystem status
>>>>>>                  -L      Follow links
>>>>>>                  -t      Display info in terse form
>>>>>>
>>>>>> I am running OwnCloud on a Synology Diskstation. Synology implemented the Busybox shell on their Diskstations.
>>>>>>
>>>>>> Cheers,
>>>>>> Alfred van Hoorn
>>>>>>
>>>>>>
>>>>>>> Op 10 sep. 2015 om 23:07 heeft Boris Ribalkin <[hidden email]> het volgende geschreven:
>>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> I am facing an issue with running file:scan on arm:
>>>>>>>
>>>>>>> filemtime(): stat failed
>>>>>>>
>>>>>>> Looks like the reason is filemtime [1] is not working for files over 2G on 32 bit php [2]
>>>>>>>
>>>>>>> Fixing function according to php website comment solved the problem:
>>>>>>>   exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));
>>>>>>>
>>>>>>> I am sure that worked fine in past with older owncloud/php versions on the same hardware.
>>>>>>>
>>>>>>> Is there something I am missing or this never worked on php (32bit) / arm?
>>>>>>> Or is it possible to have some if, like:
>>>>>>>
>>>>>>> if (PHP_INT_SIZE === 4)
>>>>>>>    return exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));
>>>>>>> else
>>>>>>>    return filemtime($this->getSourcePath($path));
>>>>>>>
>>>>>>>
>>>>>>> I cannot upgrade php to 64 bit on arm board as there there is no such thing yet as arm64 or at least not popular enough on single board computers yet.
>>>>>>>
>>>>>>> [1] http://php.net/manual/en/function.filemtime.php#68814
>>>>>>> [2] https://github.com/owncloud/core/blob/master/lib/private/files/storage/local.php#L159
>>>>>>>
>>>>>>> My system:
>>>>>>> ownCloud version 8.0.4
>>>>>>> PHP Version => 5.6.9
>>>>>>> System => Linux cubietruck 3.4.79-sun7i #13 SMP PREEMPT Thu Jul 3 06:34:55 CST 2014 armv7l
>>>>>>> Configure Command =>  './configure'  '--enable-fpm' '--with-pgsql' '--with-pdo-pgsql' '--enable-opcache' '--prefix' '--with-config-file-path=/root/build/install/config' '--with-gd' '--enable-zip' '--with-zlib' '--with-curl' '--with-readline' '--with-ldap' '--with-ldap-sasl' '--with-libdir=lib/arm-linux-gnueabihf' '--enable-mbstring'
>>>>>>>
>>>>>>> Thank you
>>>>>>>
>>>>>>> --
>>>>>>> Boris Rybalkin
>>>>>>> [hidden email]
>>>>>>> _______________________________________________
>>>>>>> Devel mailing list
>>>>>>> [hidden email]
>>>>>>> http://mailman.owncloud.org/mailman/listinfo/devel
>>>>>> _______________________________________________
>>>>>> Devel mailing list
>>>>>> [hidden email]
>>>>>> http://mailman.owncloud.org/mailman/listinfo/devel
>>>> _______________________________________________
>>>> Devel mailing list
>>>> [hidden email]
>>>> http://mailman.owncloud.org/mailman/listinfo/devel
>>
>>
>> --
>> Boris Rybalkin
>> [hidden email]
>
>
> _______________________________________________
> Devel mailing list
> [hidden email]
> http://mailman.owncloud.org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: php 32 bit (arm) filemtime issue

hoorna
Boris,
 
As you asked for , I have created a seperate issue on github. :-) See https://github.com/owncloud/core/issues/18994
 
I am curious for your comments and from others.
 
 
------ Origineel bericht ------
Van: "Boris Ribalkin" <[hidden email]>
Aan: "List for Developers of ownCloud" <[hidden email]>; "Alfred van Hoorn" <[hidden email]>
Verzonden: 12-9-2015 14:48:05
Onderwerp: Re: [owncloud-devel] php 32 bit (arm) filemtime issue
 

Alfred,

Could you create separate issue and remove your comment from my issue. I am happy to post my comments regarding your problem to github.

Thank you.

On Sep 12, 2015 11:30, "Bernhard Posselt" <[hidden email]> wrote:
Hi guys,

can you please really move this to github? ;)

On 09/12/2015 11:40 AM, Alfred van Hoorn wrote:

> Boris,
>
> Indeed your issue is different from the issue I have. And your are also right that my issue had to do with the verstond of Busybox.
>
> The version of Busybox whIch Synology uses on DiskStations (latest firmware)  is 1.16.1. This is a rather old version of Busybox but it is on a DiskStation  hardly impossible to upgrade Busybox to a newer version without creating problems with operating of this NAS.
>
> I have two questions:
> 1) I don't see an solution for my issue with occ file:scan. Am I right?
> 2) Do you know if the messages I get from file:scan are warnings or are error-messages? In other words, is file:scan on my box operating as supposed or are there things going wrong?
>
> Cheers.
>
>
>
>> Op 11 sep. 2015 om 23:08 heeft Boris Ribalkin <[hidden email]> het volgende geschreven:
>>
>> Alfred,
>>
>> Looks like latest busybox has proper stat app:
>>
>> http://www.busybox.net/downloads/BusyBox.html
>>
>> stat
>> stat [OPTIONS] FILE...
>>
>> Display file (default) or filesystem status
>>
>> Options:
>>
>>         -c fmt  Use the specified format
>>         -f      Display filesystem status
>>         -L      Dereference links
>>         -t      Display info in terse form
>>
>>
>>> On Fri, Sep 11, 2015 at 2:54 PM, Boris Ribalkin <[hidden email]> wrote:
>>> Sorry, I thought you also applied the fix from php website. If you did not and this is your original error message then probably you are facing a bit different issue because filemtime owncloud function right now does not use stat Linux app.
>>>
>>> But anyway your error tells that stat app you have does not support -c option. Try running 'stat --help' in your server shell.
>>>> On Sep 11, 2015 13:58, "Alfred van Hoorn" <[hidden email]> wrote:
>>>> H Boris,
>>>>
>>>> I don't know what you mean by this. Please help.
>>>>
>>>> Alfred
>>>>
>>>> ------ Origineel bericht ------
>>>> Van: "Boris Ribalkin" <[hidden email]>
>>>> Aan: "List for Developers of ownCloud" <[hidden email]>
>>>> Verzonden: 11-9-2015 10:18:09
>>>> Onderwerp: Re: [owncloud-devel] php 32 bit (arm) filemtime issue
>>>>
>>>>> Alfred,
>>>>>
>>>>> Looks like you may try free bsd option (according to php website)
>>>>>
>>>>> On FreeBSD:
>>>>> $mtime = exec ('stat -f %m '. escapeshellarg ($path));
>>>>>
>>>>> On Sep 11, 2015 07:42, "Alfred van Hoorn" <[hidden email]> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I am also facing an issue with file:scan. While running that command I am receiving many, many, many times the next message:
>>>>>>
>>>>>>          stat: invalid option -- 'c'
>>>>>>          BusyBox v1.16.1 (2015-06-29 18:12:44 CST) multi-call binary.
>>>>>>
>>>>>>          Usage: stat [OPTIONS] FILE...
>>>>>>
>>>>>>          Display file (default) or filesystem status
>>>>>>
>>>>>>          Options:
>>>>>>                  -f      Display filesystem status
>>>>>>                  -L      Follow links
>>>>>>                  -t      Display info in terse form
>>>>>>
>>>>>> I am running OwnCloud on a Synology Diskstation. Synology implemented the Busybox shell on their Diskstations.
>>>>>>
>>>>>> Cheers,
>>>>>> Alfred van Hoorn
>>>>>>
>>>>>>
>>>>>>> Op 10 sep. 2015 om 23:07 heeft Boris Ribalkin <[hidden email]> het volgende geschreven:
>>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> I am facing an issue with running file:scan on arm:
>>>>>>>
>>>>>>> filemtime(): stat failed
>>>>>>>
>>>>>>> Looks like the reason is filemtime [1] is not working for files over 2G on 32 bit php [2]
>>>>>>>
>>>>>>> Fixing function according to php website comment solved the problem:
>>>>>>>   exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));
>>>>>>>
>>>>>>> I am sure that worked fine in past with older owncloud/php versions on the same hardware.
>>>>>>>
>>>>>>> Is there something I am missing or this never worked on php (32bit) / arm?
>>>>>>> Or is it possible to have some if, like:
>>>>>>>
>>>>>>> if (PHP_INT_SIZE === 4)
>>>>>>>    return exec ('stat -c %Y '. escapeshellarg ($this->getSourcePath($path)));
>>>>>>> else
>>>>>>>    return filemtime($this->getSourcePath($path));
>>>>>>>
>>>>>>>
>>>>>>> I cannot upgrade php to 64 bit on arm board as there there is no such thing yet as arm64 or at least not popular enough on single board computers yet.
>>>>>>>
>>>>>>> [1] http://php.net/manual/en/function.filemtime.php#68814
>>>>>>> [2] https://github.com/owncloud/core/blob/master/lib/private/files/storage/local.php#L159
>>>>>>>
>>>>>>> My system:
>>>>>>> ownCloud version 8.0.4
>>>>>>> PHP Version => 5.6.9
>>>>>>> System => Linux cubietruck 3.4.79-sun7i #13 SMP PREEMPT Thu Jul 3 06:34:55 CST 2014 armv7l
>>>>>>> Configure Command =>  './configure'  '--enable-fpm' '--with-pgsql' '--with-pdo-pgsql' '--enable-opcache' '--prefix' '--with-config-file-path=/root/build/install/config' '--with-gd' '--enable-zip' '--with-zlib' '--with-curl' '--with-readline' '--with-ldap' '--with-ldap-sasl' '--with-libdir=lib/arm-linux-gnueabihf' '--enable-mbstring'
>>>>>>>
>>>>>>> Thank you
>>>>>>>
>>>>>>> --
>>>>>>> Boris Rybalkin
>>>>>>> [hidden email]
>>>>>>> _______________________________________________
>>>>>>> Devel mailing list
>>>>>>> [hidden email]
>>>>>>> http://mailman.owncloud.org/mailman/listinfo/devel
>>>>>> _______________________________________________
>>>>>> Devel mailing list
>>>>>> [hidden email]
>>>>>> http://mailman.owncloud.org/mailman/listinfo/devel
>>>> _______________________________________________
>>>> Devel mailing list
>>>> [hidden email]
>>>> http://mailman.owncloud.org/mailman/listinfo/devel
>>
>>
>> --
>> Boris Rybalkin
>> [hidden email]
>
>
> _______________________________________________
> Devel mailing list
> [hidden email]
> http://mailman.owncloud.org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: php 32 bit (arm) filemtime issue

Chris-3
In reply to this post by Bernhard Posselt-2
CONTENTS DELETED
The author has deleted this message.