Add PHP Extension Module

Source: Internet
Author: User

1. Add a location to install the extension module 

  [email protected]_22 ~]# ls/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/

Opcache.a opcache.so swoole.so

2. All available Module locations

  [email protected]_22 ~]# ls/usr/local/php7/include/php/ext/

Date Filter Hash JSON mbstring MYSQLND PDO session sockets Sqlite3 Swoole
Dom GD iconv libxml mysqli pcre Phar SimpleXML SPL standard XML

3. View the current PHP configuration file (default in Php/etc)

  [email protected]_22 ~]# /usr/local/php7/bin/php--ini

Configuration File (php.ini) Path:/usr/local/php/etc
Loaded Configuration File:/usr/local/php/etc/php.ini
Scan for additional. ini files in: (none)
Additional. ini files parsed: (none)

4. Modify the php.ini file

Plus extension=/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/swoole.so.

5. Restart Apche (nginx) and PHP-FPM

6. View PHP currently available modules

  [email protected]_22 ~]# /usr/local/php7/bin/php-m

[PHP Modules]
bz2
Calendar
cgi-fcgi
Core
CType ....

Note: compile and install to specify PHP.ini (multi-PHP version coexistence situation)

--with-config-file-path=/usr/local/php/etc

  

Add PHP Extension Module

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.