PHP Velho Oeste 2024

はじめに

この拡張モジュールを構築するには外部ライブラリは必要ありませんが、 Linux 上で LFS (ラージファイル) をサポートする PHP を希望する場合は、 最新の glibc を入手し、次のコンパイラフラグ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 を付けて PHP をコンパイルする必要があります。

add a note add a note

User Contributed Notes 1 note

up
0
hb at testwelt dot deneb dot uberspace dot com
7 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