Home  >  Article  >  Backend Development  >  How to install php zbarcode

How to install php zbarcode

藏色散人
藏色散人Original
2021-07-02 10:30:322141browse

How to install php zbarcode: 1. Install ImageMagick dependencies through yum; 2. Install zbar extension; 3. Install php-devel; 4. Download and install php-zbarcode through git; 5. Restart apache.

How to install php zbarcode

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

How to install php zbarcode?

Steps to install php-zbarcode

1 Install ImageMagick dependencies

yum install ImageMagick ImageMagick-devel

2 Install zbar extension

wget -c http://jaist.dl.sourceforge.net/project/zbar/zbar/0.10/zbar-0.10.tar.bz2
tar jxvf zbar-0.10.tar.bz2
cd zbar-0.10
./configure --without-gtk --without-python --without-qt --prefix=/usr/local/zbar ##禁止gtk,python和qt的支持
make && make install

3 Install php-devel

yum install php-devel

4 Install php-zbarcode

git clone https://github.com/mkoppanen/php-zbarcode.git 
cd php-zbarcode
/usr/bin/phpize #自己phpize的位置
./configure --with-php-config=/usr/bin/php-config --with-zbarcode=/usr/local/zbar/
make && make install

5 Add extension=zbarcode.so to php.ini and restart apache

Recommended learning: "PHP Video Tutorial

The above is the detailed content of How to install php zbarcode. 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