Home > Backend Development > PHP Problem > How to install calendar extension in php

How to install calendar extension in php

藏色散人
Release: 2023-03-09 15:34:01
Original
3195 people have browsed it

How to install the calendar extension in php: first find the currently used php version; then find the corresponding php version, download it, upload it to the server and decompress it; then find and modify the php.ini file; finally add the calendar extension module and restart php-fpm.

How to install calendar extension in php

The operating environment of this article: linux5.9.8 system, PHP5.6.24 version, DELL G3 computer

php adds calendar extension module

#首先查找当前使用的的php版本
[root@server1 src]# /usr/local/bin/php --version
PHP 5.6.24 (cli) (built: Aug 25 2016 12:14:39)
Copyright © 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright © 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright © 1999-2016, by Zend Technologies
#找到相对应的php版本,下载、上传到服务器并解压
#重新编译php
#phpize是否在对应的目录下
[root@server1 ~]# ll /usr/local/php/bin/phpize
-rwxr-xr-x. 1 root root 4534 Jul 11 2018 /usr/local/php/bin/phpize
[root@server1 ~]#/usr/local/php/bin/phpize
[root@server1 php-5.6.24]# cd ext/calendar/
[root@server1 calendar]# pwd
/usr/local/src/php-5.6.24/ext/calendar
#php-config是否在对应的目录下
[root@server1 calendar]# ll /usr/local/php/bin/php-config
-rwxr-xr-x. 1 root root 3392 Jul 11 2018 /usr/local/php/bin/php-config
[root@server1 calendar]#./configure —with-php-config=/usr/local/php/bin/php-config —enable-calendar
[root@server1 calendar]#make & make install
#修改php.ini
[root@server1 calendar]# cd /usr/local/php/etc/
[root@server1 etc]#vim php.ini
#添加对应的模块
[curl]
extension_dir = /usr/local/php/lib/php/extensions/no-debug-zts-20131226/
extension = calendar.so
#重启php-fpm
/etc/init.d/php-fpm restart
#查看calendar模块是否添加成功,如果有calendar,则该模块添加成功
[root@server1 etc]# php -m| grep calendar
calendar
#至此大功告成
Copy after login

Recommended learning: "PHP Video Tutorial"

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

Related labels:
php
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