mkoppanen / php-zbarcode

PHP extension for reading barcodes. Uses ImageMagick(http://www.imagemagick.org/) for image support and zbar(http://zbar.sourceforge.net/) for scanning the barcodes.
http://valokuva.org
383 stars 131 forks source link

How to install? #5

Closed dmitry-saritasa closed 11 years ago

dmitry-saritasa commented 11 years ago

Mikko,

Can you pls provide short instructions how to compile the sources?

I put the files inside PHP sources in ext/zbarcode folder

then I'm trying to compile PHP ./configure --prefix=/usr/local/php547 --with-zbarcode --with-zbarcode-imagemagick-dir

and what I get is this:

config.status: executing default commands configure: WARNING: unrecognized options: --with-zbarcode, --with-zbarcode-imagemagick-dir

Any ideas what I'm doing wrong?

thanks, Dmitry

mkoppanen commented 11 years ago

http://www.php.net/manual/en/install.pecl.phpize.php

dmitry-saritasa commented 11 years ago

:) ok found the way you need to run phpize by being in this folder. the problem is that I have 2 PHPs installed - 5.3.8 and 5.4.7, even if I run phpize from /usr/local/php547/bin/phpize . and then do make test

[root@lindev php-zbarcode-master]# make test

Build complete. Don't forget to run 'make test'.

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/src/php-zbarcode/php-zbarcode-master/modules/zbarcode.so' - /usr/src/php-zbarcode/php-zbarcode-master/modules/zbarcode.so: undefined symbol: phpi_get_le_gd in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/src/php-zbarcode/php-zbarcode-master/modules/zbarcode.so' - /usr/src/php-zbarcode/php-zbarcode-master/modules/zbarcode.so: undefined symbol: phpi_get_le_gd in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/src/php-zbarcode/php-zbarcode-master/modules/zbarcode.so' - /usr/src/php-zbarcode/php-zbarcode-master/modules/zbarcode.so: undefined symbol: phpi_get_le_gd in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/src/php-zbarcode/php-zbarcode-master/modules/zbarcode.so' - /usr/src/php-zbarcode/php-zbarcode-master/modules/zbarcode.so: undefined symbol: phpi_get_le_gd in Unknown on line 0

PHP : /usr/bin/php PHP_SAPI : cli PHP_VERSION : 5.3.8 ZEND_VERSION: 2.3.0 PHP_OS : Linux - Linux lindev.saritasa.com 2.6.35.13-91.fc14.x86_64 #1 SMP Tue May 3 13:23:06 UTC 2011 x86_64 INI actual : /usr/src/php-zbarcode/php-zbarcode-master/tmp-php.ini More .INIs :
CWD : /usr/src/php-zbarcode/php-zbarcode-master Extra dirs :

VALGRIND : Not used

TIME START 2013-03-24 19:44:41

SKIP Test construction [tests/001-construct.phpt] reason: . SKIP Test reading image and scanning barcode [tests/002-read-barcode.phpt] reason: . SKIP Test setting config [tests/003-setconfig.phpt] reason: . SKIP Test multipage reading and single page reading [tests/004-paged-reading.phpt] reason: . SKIP Test count [tests/005-count.phpt] reason: . SKIP Check whether imagick integration works [tests/006-imagick.phpt] reason: .

SKIP Test GD support [tests/007-test-gd.phpt] reason: .

TIME END 2013-03-24 19:44:42

TEST RESULT SUMMARY

Exts skipped : 0

Exts tested : 28

Number of tests : 7 0 Tests skipped : 7 (100.0%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 0 ( 0.0%) ( 0.0%) Expected fail : 0 ( 0.0%) ( 0.0%)

Tests passed : 0 ( 0.0%) ( 0.0%)

Time taken : 1 seconds

This report can be automatically sent to the PHP QA team at http://qa.php.net/reports and http://news.php.net/php.qa.reports

So it uses PHP 5.3.8 and not PHP 5.4.7 - how can I tell make to use a different PHP?

thanks, Dmitry

dmitry-saritasa commented 11 years ago

Okay found a way to do it.

./configure --with-php-config=/usr/local/php547/bin/php-config

just provide a valid path to php_config