Get the App
SLTechnology News&Howtos  ›  Development  › 

How to compile and install and use msgpack-php

Shulou Source: shulou.com Published: 2022-06-03 19:03:58 11月12日 Update

This article mainly introduces "how to compile and install and use msgpack-php". In daily operation, I believe many people have doubts about how to compile and install and use msgpack-php. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the questions of "how to compile and install and use msgpack-php". Next, please follow the editor to study!

Msgpack is a PECL extension that provides API for communicating with MessagePack serialization.

MessagePack is an efficient binary-based object serialization class library that can be used for cross-language communication. It can exchange structural objects between many languages like JSON; but it is faster and lighter than JSON.

download

Wget https://github.com/msgpack/msgpack-php/archive/msgpack-2.0.3.tar.gz

Decompression

Tar-zxvf msgpack-2.0.3.tar.gz cd msgpack-php-msgpack-2.0.3/

View phpize file path

$whereis phpizephpize: / usr/local/php-7.2.9/bin/phpize

Compile from source code

$. / configure$make & & make install

Modify the configuration file

Sudo vim / usr/local/php-7.2.9/etc/php.ini / / add the following extended extension=msgpack.so

Restart php-fpm to check whether the installation is successful

Sudo systemctl restart php-fpm.service

Official simple case msgpack-test.php

Tags: Compile learn object sequence file more language help communication utility lightweight success next between binary official article method case source code Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Apple Shulou Technology macOS NVidia