[owncloud-devel] php 32 bit (arm) filemtime issue

Alfred van Hoorn email at alfredvanhoorn.nl
Fri Sep 11 06:41:57 GMT 2015


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 <ribalkin at gmail.com> 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
> ribalkin at gmail.com
> _______________________________________________
> Devel mailing list
> Devel at owncloud.org
> http://mailman.owncloud.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20150911/adcb7446/attachment.html>


More information about the Devel mailing list