【記錄】編譯安裝 IgBinary 擴充套件

cnguu發表於2019-07-08

簡介

IgBinary,第三方序列化擴充套件,替代預設的 serialize,具有高效能、節省空間等特點

下載

$ git clone https://github.com/igbinary/igbinary.git

安裝

$ phpize
$ ./configure --with-php-config=/www/server/php/72/bin/php-config
$ sudo make
$ sudo make install

配置

; Load igbinary extension
extension=igbinary.so

; Use igbinary as session serializer
session.serialize_handler=igbinary

; Enable or disable compacting of duplicate strings
; The default is On.
igbinary.compact_strings=On

; If uncommented, use igbinary as the serializer of APCu
; (APCu 5.1.10 or newer is strongly recommended)
apc.serializer=igbinary

驗證

$ php -m | grep igbinary

輸出 igbinary 說明成功

用法

  • igbinary_serialize
  • igbinary_unserialize

愛護牙齒

相關文章