php installation extension

不言
Release: 2023-03-25 06:20:02
Original
1555 people have browsed it

The content introduced in this article is about the installation and expansion of PHP, which has certain reference value. Now I share it with everyone. Friends in need can refer to it

1. Previous notes have been formatted with one click Huh, I'm really worried. Let’s re-write a note

2. The current PHP installation directory and compilation directory

    php安装路径是/usr/local/php7
    php编译目录是/usr/local/src/php
Copy after login

3. The following commands are created and executed after compiling and installing PHP.

#进入php编译目录
jack# cd /usr/local/src/php
Copy after login
#举例子,安装bcmath拓展
jack# cd ext/bcmath
Copy after login
#调用php安装路下 bin/phpize命令,
#自动在当前的预拓展的目录下执行
jack# /usr/local/php7/bin/phpize
Copy after login
#检查下configure
#注意php-config默认在php安装目录下/bin
jack# ./configure --enable-bcmath --with-php-config=/usr/local/php7/bin/php-config
Copy after login
#安装拓展
jack# sudo make && sudo make install
Copy after login
#接着检验安装拓展是否成功
jack# cd /usr/local/php7
jack# find . -name *.so
#接着在php.ini配置添加拓展即可【这里省略,请百度】
Copy after login

Related recommendations:

Automatic loading of PHP classes

Implementing PHP’s automatic dependency injection container EasyDI container

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!