In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you "php how to install protobuf extension", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "php how to install protobuf extension" this article.
We know that Protocol Buffers is a cross-language, cross-platform, scalable data transmission and storage protocol defined by Google. Because the field protocol is placed at both ends of the transmission, the transmitted data only contains the data itself, and there is no need to include the field description, so the amount of transmitted data is small and the parsing efficiency is high. Those who are interested can visit https://developers.google.com/protocol-buffers/docs/overview. Protocol Buffers officially only supports Clippers, Java, Python, Cellular, Go. If you want to use Protocol Buffers in PHP, you need to resort to third-party extensions. The installation method is as follows.
Download the resource package https://github.com/allegro/php-protobuf/
The steps are as follows:
1. Upload to the server, decompress it, and enter the decompressed directory
[root@test ~] # unzip php-protobuf-master.zip
[root@test ~] # cd php-protobuf-master
2. Execute phpize
[root@test php-protobuf-master] # / soft/php/bin/phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
3. Compile and install make
[root@test php-protobuf-master] #. / configure-with-php-config=/soft/php/bin/php-config
[root@test php-protobuf-master] # make
[root@test php-protobuf-master] # make install
Installing shared extensions: / soft/php/lib/php/extensions/no-debug-non-zts-20090626/
Generate extension files in the directory after installation
[root@test php-protobuf-master] # ll / soft/php/lib/php/extensions/no-debug-non-zts-20090626/
-rwxr-xr-x. 1 root root 130247 3?. 8 11:19 protobuf.so
Edit the php.ini file and add a line
[root@test php-protobuf-master] # vi / soft/php/lib/php.ini
[memcache]
Extension_dir = "/ soft/php/lib/php/extensions/no-debug-non-zts-20090626/"
Extension = "redis.so"
Extension = "protobuf.so"
Restart php after saving and exiting, and then open a browser to check that phpinfo.php has a protobuf module, indicating that the installation is successful.
These are all the contents of the article "how to install protobuf extensions in php". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.