# full LFS support

- Thread: https://externals.io/message/49186
- Original archive: https://news-web.php.net/php.internals/49186
- Started by Ferenc Kovacs on 2010-07-30T14:14:24+00:00
- Messages: 15
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #49186 — Ferenc Kovacs — 2010-07-30T14:14:24+00:00

URL: https://externals.io/message/49186#49186

Hi.

I would like to know what is the current status of the LFS support for php.

http://bugs.php.net/bug.php?id=27792
http://bugs.php.net/bug.php?id=48886

As far as I can see, there are some patches floating around, but some
of them doesn't work, some of them are incomplete.

As far as I can see, with the latest release(5.3.3) you can't stat or
filesize a file where the size is >= 2GiB on 32bit OS, and >= 4GiB on
64bit.
Is this true?
From the proposed patches, it seems that there arent that many LOC
which needs to be adjusted to provide a decent LFS support.
Are there any blocker objections or architectural problems, or we just
lack specification or manpower to fix this issue?
If this gets fixed, will this be included into the 5.3 branch, or this
can only be added with the next major version?

Tyrael

---

## #49198 — gaochunhui@gmail.com — 2010-08-03T12:11:07+00:00

URL: https://externals.io/message/49186#49198 · In reply to: #49186

nobody to care this change? :(

-----邮件原件-----
发件人: tyra3l@gmail.com [mailto:tyra3l@gmail.com] 代表 Ferenc Kovacs
发送时间: 2010年7月30日 22:14
收件人: PHP Internals
主题: [PHP-DEV] full LFS support

Hi.

I would like to know what is the current status of the LFS support for php.

http://bugs.php.net/bug.php?id=27792
http://bugs.php.net/bug.php?id=48886

As far as I can see, there are some patches floating around, but some of them doesn't work, some of them are incomplete.

As far as I can see, with the latest release(5.3.3) you can't stat or filesize a file where the size is >= 2GiB on 32bit OS, and >= 4GiB on 64bit.
Is this true?
From the proposed patches, it seems that there arent that many LOC which needs to be adjusted to provide a decent LFS support.
Are there any blocker objections or architectural problems, or we just lack specification or manpower to fix this issue?
If this gets fixed, will this be included into the 5.3 branch, or this can only be added with the next major version?

Tyrael

---

## #49199 — Ferenc Kovacs — 2010-08-03T13:01:07+00:00

URL: https://externals.io/message/49186#49199 · In reply to: #49198

Maybe this is just lost in the weekend's email swarm.
At least I hope this is the reason for the silence.

Tyrael


> nobody to care this change? :(
>
> -----邮件原件-----
> 发件人: tyra3l@gmail.com [mailto:tyra3l@gmail.com] 代表 Ferenc Kovacs
> 发送时间: 2010年7月30日 22:14
> 收件人: PHP Internals
> 主题: [PHP-DEV] full LFS support
>
> Hi.
>
> I would like to know what is the current status of the LFS support for php.
>
> http://bugs.php.net/bug.php?id=27792
> http://bugs.php.net/bug.php?id=48886
>
> As far as I can see, there are some patches floating around, but some of them doesn't work, some of them are incomplete.
>
> As far as I can see, with the latest release(5.3.3) you can't stat or filesize a file where the size is >= 2GiB on 32bit OS, and >= 4GiB on 64bit.
> Is this true?
> From the proposed patches, it seems that there arent that many LOC which needs to be adjusted to provide a decent LFS support.
> Are there any blocker objections or architectural problems, or we just lack specification or manpower to fix this issue?
> If this gets fixed, will this be included into the 5.3 branch, or this can only be added with the next major version?
>
> Tyrael

---

## #49203 — Ronald Chmara — 2010-08-04T08:13:00+00:00

URL: https://externals.io/message/49186#49203 · In reply to: #49199

$code < $complaints;


> Maybe this is just lost in the weekend's email swarm.
> At least I hope this is the reason for the silence.
>
> Tyrael
>
> 
> > […]

---

## #49204 — Ronald Chmara — 2010-08-04T08:15:35+00:00

URL: https://externals.io/message/49186#49204 · In reply to: #49203

Sorry:
$code > $complaints;

2010/8/4 Ronald Chmara <ronabop@gmail.com>:
> $code < $complaints;
>
> 
> > […]

---

## #49439 — Ferenc Kovacs — 2010-08-17T14:22:51+00:00

URL: https://externals.io/message/49186#49439 · In reply to: #49199

>
>
> > […]
> php.
> > […]
> them doesn't work, some of them are incomplete.
> > […]
> filesize a file where the size is >= 2GiB on 32bit OS, and >= 4GiB on 64bit.
> > […]
> needs to be adjusted to provide a decent LFS support.
> > […]
> lack specification or manpower to fix this issue?
> > […]
> can only be added with the next major version?
> > […]
>

bump.

Tyrael

---

## #55244 — Ferenc Kovacs — 2011-09-06T13:43:11+00:00

URL: https://externals.io/message/49186#55244 · In reply to: #49439

> > […]
>
> bump.
> Tyrael

bump
(hoping that maybe laruence or Felipe takes a look)

Tyrael

---

## #55245 — Felipe Pena — 2011-09-06T14:22:34+00:00

URL: https://externals.io/message/49186#55245 · In reply to: #55244

AFAIK Pierre has some point about Windows part.

2011/9/6 Ferenc Kovacs <info@tyrael.hu>:
> 
> > […]
>
> bump
> (hoping that maybe laruence or Felipe takes a look)
>
> Tyrael
>
> --
> 
> 
>
>



-- 
Regards,
Felipe Pena

---

## #60727 — Ferenc Kovacs — 2012-06-02T16:20:43+00:00

URL: https://externals.io/message/49186#60727 · In reply to: #55245

bump.



> AFAIK Pierre has some point about Windows part.
>
> 2011/9/6 Ferenc Kovacs <info@tyrael.hu>:
> > […]
> for
> > […]
> some of
> > […]
> on 64bit.
> > […]
> which
> > […]
> just
> > […]
> this
> > […]
>
>
>
> --
> Regards,
> Felipe Pena

---

## #60729 — Gustavo Lopes — 2012-06-03T11:55:44+00:00

URL: https://externals.io/message/49186#60729 · In reply to: #60727

> > […]

This most likely would be doable only in the next version as it requires  
changing the signatures of extension API functions.

I suggest that you make a pull request *with some tests* (you can add a  
function to the debug build to create a large sparse file). I'll offer to  
review it then.

-- 
Gustavo Lopes

---

## #60730 — Ferenc Kovacs — 2012-06-03T12:04:04+00:00

URL: https://externals.io/message/49186#60730 · In reply to: #60729

On Sun, Jun 3, 2012 at 1:55 PM, Gustavo Lopes <glopes@nebm.ist.utl.pt>wrote:

> 
>
>  I would like to know what is the current status of the LFS support
> > […]
> This most likely would be doable only in the next version as it requires
> changing the signatures of extension API functions.
>
> I suggest that you make a pull request *with some tests* (you can add a
> function to the debug build to create a large sparse file). I'll offer to
> review it then.
>
>
Hi,

Don't forget that I started this thread back in 2010, targeting 5.3 was
possible (albeit highly unlikely) back then.
I'm aware that this can only introduced in the next major (if we stick to
the release process rfc) php version.

Tyrael

---

## #60731 — Ferenc Kovacs — 2012-06-03T12:05:43+00:00

URL: https://externals.io/message/49186#60731 · In reply to: #60730

>
>
> On Sun, Jun 3, 2012 at 1:55 PM, Gustavo Lopes <glopes@nebm.ist.utl.pt>wrote:
>
> > […]
> Hi,
>
> Don't forget that I started this thread back in 2010, targeting 5.3 was
> possible (albeit highly unlikely) back then.
> I'm aware that this can only introduced in the next major (if we stick to
> the release process rfc) php version.
>
>
my bad, 5.3.0 was out already when I opened the thread, so that was a bad
assumption on my part back then.

Tyrael

---

## #60733 — Pierre Joye — 2012-06-04T07:32:51+00:00

URL: https://externals.io/message/49186#60733 · In reply to: #60729

hi,



> This most likely would be doable only in the next version as it requires
> changing the signatures of extension API functions.
>
> I suggest that you make a pull request *with some tests* (you can add a
> function to the debug build to create a large sparse file). I'll offer to
> review it then.

There are other considerations to take care of besides adding simple
LFS support (with limited needs out there). The magic with double and
co is simply not clean and should be done with real 64bit or large
integer support, or it will just be yet another ugly implementation in
php.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #60734 — Gustavo Lopes — 2012-06-04T07:50:57+00:00

URL: https://externals.io/message/49186#60734 · In reply to: #60733

> On Sun, Jun 3, 2012 at 1:55 PM, Gustavo Lopes 
> <glopes@nebm.ist.utl.pt> wrote:
>
> > […]
>
> There are other considerations to take care of besides adding simple
> LFS support (with limited needs out there). The magic with double and
> co is simply not clean and should be done with real 64bit or large
> integer support, or it will just be yet another ugly implementation 
> in
> php.
>

I should tend to agree, but in any case it shouldn't stop us from 
fixing the streams C API to use the correct types. As a bonus, we'll 
have LFS support in compilers with 64-bit longs.

-- 
Gustavo Lopes

---

## #60735 — Pierre Joye — 2012-06-04T08:33:24+00:00

URL: https://externals.io/message/49186#60735 · In reply to: #60734

> I should tend to agree, but in any case it shouldn't stop us from fixing the
> streams C API to use the correct types. As a bonus, we'll have LFS support
> in compilers with 64-bit longs.

The correct types usage is a very old todo and should be fixed.
However it can be done only in a major version as it will drastically
affect many extensions. Even if it is mostly internals changes. That's
something I like to begin with this summer, let try to sync us and see
how we can get that done in a reasonable time frame :)

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
