WordPress – OpenCart – SEO – Web Development

Cài đặt drive PHP MongoDB với PECL – php 7.3

Cách cài đặt Cài đặt drive PHP MongoDB với PECL trên CentOS với php 7.3

Thông tin để cài đặt tiện ích mở rộng PECL này có thể được tìm thấy trong chương thủ công có tiêu đề Cài đặt tiện ích mở rộng PECL. Thông tin bổ sung như bản phát hành mới, bản tải xuống, tệp nguồn, thông tin người bảo trì và CHANGELOG, có thể được tìm thấy tại đây: »https://pecl.php.net/package/mongodb

Người dùng Linux, Unix và macOS có thể chạy lệnh sau để cài đặt trình điều khiển:

$ sudo pecl install mongodb

Cuối cùng, thêm dòng sau vào tệp php.ini của bạn:

extension=mongodb.so

Khi cài mà xuất hiệu lỗi

cd . && /bin/sh
/usr/local/directadmin/customapache/gd-2.0.34/config/missing --run autoheader
configure.ac:28: error: Autoconf version 2.58 or higher is required
aclocal.m4:7856: AM_INIT_AUTOMAKE is expanded from...
configure.ac:28: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
autoheader: /usr/bin/autom4te failed with exit status: 1

Cách xử lý

cd /usr/src
wget http://files.directadmin.com/services/custombuild/autoconf-2.69.tar.gz
tar xzf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr
make
make install

=============================================================

nếu bạn gặp lỗi bên dưới thì có cách fixed mình đã chạy thấy ok

# phpize
Can't find PHP headers in /usr/include/php
The php-devel package is required for use of this command.

How to fix this error?

I think you have not installed php-pear . I am not seeing it in that link.

You can do it by yum install php-pear

Info

You can install xdebug also using these steps

1) Install PHP’s devel package for PHP commands execution

yum install php-devel

Make sure you also have php-pear package installed

yum install php-pear

2) Install GCC and GCC C++ compilers to compile Xdebug extension yourself.

yum install gcc gcc-c++ autoconf automake

3) Compile Xdebug

pecl install Xdebug

4) Find the php.ini file using

`locate php.ini`

And add the following line

[xdebug]
zend_extension="/usr/lib64/php/modules/xdebug.so"
xdebug.remote_enable = 1

5) Restart Apache service httpd restart

6) Test if it works – create test.php with the following code

<?php phpinfo(); ?>

Giới thiệu tác giả

Giới thiệu tác giả: .

Gửi bình luận

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Top