소개

이 확장을 빌드할 때 외부 라이브러리는 필요하지 않습니다. 그러나 리눅스에서 PHP가 LFS(large files)를 지원하게 하려면, 최신의 glibc가 필요하고 PHP를 다음 컴파일러 플래그로 컴파일해야 합니다: -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64.

add a note add a note

User Contributed Notes 1 note

up
0
hb at testwelt dot deneb dot uberspace dot com
8 years ago
That does not work:

System: ubuntu 16.04 32-Bit

1. downloaded the sources php-5.6.26 from php.net
2. unpacked the tar.bz2
3. configured:
CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" ./configure --prefix=$HOME/opt/php-largefile-test/ \
--disable-all --enable-cli > ../log.delme
4. make && make install
5. create some testfiles:
truncate -s1G 1G_file
truncate -s2G 2G_file
truncate -s4G 4G_file
truncate -s8G 8G_file
truncate -s16G 16G_file

6. check filesize of the testfiles with filesize()-function:
16G_file  size: 0
1G_file size: 1073741824
2G_file size: -2147483648
4G_file size: 0
8G_file size: 0

Whats wrong here?
To Top