Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What are the ways to install extensions in php

Shulou Source: shulou.com Published: 2022-05-31 10:57:22 10月03日 Update

Today Xiaobian to share with you the php installation extension method has what related knowledge points, detailed content, clear logic, I believe most people are still too familiar with this knowledge, so share this article for your reference, I hope you have read this article after harvest, let's learn about it together.

Use phpize to prepare the conversion environment for the PHP extension library. This generates extname.so and automatically places it in the PHP extensions directory. You need to tweak php.ini to add extension= extensionname.so before you can use this extension library.

$ wget extension.tar.gz$ tar ...$ cd php-7.1/extension/extname$ /usr/local/php/bin/phpize$ ./ configure$ make# make install

Download and compile the source code for extension name and install extension_dir in extension name.so. So extname.so can be loaded via php.ini.

#Find extension $ pecl search extname#Install extension $ pecl install extname#Uninstall extension $ pecl uninstall extname

3, install PHP extension yum command automatically configure php.ini file, installed directly after use, very convenient. The downside is that there is no corresponding extension package in apt or yum.

~# yum install -y php-pecl-memcachedReading package lists... DoneReading state information... Done... The above is "php installation extension method what" all the content of this article, thank you for reading! I believe everyone has a great harvest after reading this article. Xiaobian will update different knowledge for everyone every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Tags: Knowledge articles methods content commands different big can be passed most that is files more source code environment directories knowledge points shortcomings industries information information channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Redmi macOS Xiaomi Shulou Information