Home>Article>Topics> How to enable php extension in Pagoda

How to enable php extension in Pagoda

藏色散人
藏色散人 Original
2019-08-22 09:13:02 18626browse

How to enable php extension in Pagoda

How to enable php extension in Pagoda?

The PHP installation path of Pagoda Panel is /www/server/php/ and supports the coexistence of multiple PHP versions, so the method of installing PHP extensions is slightly different from the examples on the Internet. Next, I will install it through oauth extension to explain how to install a third-party PHP extension.

Related recommendations: [Pagoda usage tutorial]

Note:

1. Before installation, please go to the software list first - Find the corresponding PHP version - Settings - Install extensions to see if we provide one-click installation of the extension you want

2. 54 in the following command is the PHP version

1. Download the extension source code (Some extended versions need to correspond to the PHP version):

wget http://pecl.php.net/get/oauth-1.2.3.tgz

2. Unzip (for zip format, please use the unzip command to decompress):

tar xvf oauth-1.2.3.tgz

3. Enter the source code directory:

cd oauth-1.2.3

4. Generate configuration (a few extensions may need to specify the directories of other dependent libraries, please modify the compilation parameters according to the official instructions):

/www/server/php/54/bin/phpize
./configure --with-php-config=/www/server/php/54/bin/php-config

5. Compile and install:

make && make install

6. Write configuration file

echo "extension = oauth.so" >> /www/server/php/54/etc/php.ini

7. Reload PHP

/etc/init.d/php-fpm-54 reload

8. Check whether the installation is successful

/www/server/php/54/bin/php -m|grep -i OAuth

9. Clean up useless files

cd .. && rm -rf oauth-1.2.3*

The above is the detailed content of How to enable php extension in Pagoda. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn