payden / php-xz Goto Github PK
View Code? Open in Web Editor NEWPHP Extension providing xz (LZMA2) compression/decompression via PHP streams.
PHP Extension providing xz (LZMA2) compression/decompression via PHP streams.
Probably this module won't work with the PHP7 environment and API.
May we get this working?
Thanks!
For some reason, I am unable to install this in my ubuntu system. I keep getting numerous errors. for instance, cd xz && phpize && ./configure && make && sudo make install gives a number of errors. This is how my installation looks: -
sudo phpize
Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
vanarpsharma@vanarpsharma:/etc/php5/xz$ sudo ./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20121212
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for xz support... yes, shared
checking for lzma_stream_encoder in -llzma... no
configure: error: wrong xz lib version or lib not found
vanarpsharma@vanarpsharma:/etc/php5/xz$
So how to proceed?
$ php -v
PHP 5.3.2-1ubuntu4.18 with Suhosin-Patch (cli) (built: Sep 12 2012 19:12:47)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.2.2, Copyright (c) 2002-2013, by Derick Rethans
$ cat /etc/issue
Ubuntu 10.04.4 LTS \n \l
$ make
/bin/bash /home/ers/LZMA/xz/libtool --mode=compile cc -I. -I/home/ers/LZMA/xz -DPHP_ATOM_INC -I/home/ers/LZMA/xz/include -I/home/ers/LZMA/xz/main -I/home/ers/LZMA/xz -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/ers/LZMA/xz/xz.c -o xz.lo
libtool: compile: cc -I. -I/home/ers/LZMA/xz -DPHP_ATOM_INC -I/home/ers/LZMA/xz/include -I/home/ers/LZMA/xz/main -I/home/ers/LZMA/xz -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/ers/LZMA/xz/xz.c -fPIC -DPIC -o .libs/xz.o
/home/ers/LZMA/xz/xz.c:70: error: PHP_FE_END undeclared here (not in a function)
make: *** [xz.lo] Error 1
if I'm comment line with PHP_FE_END compiled fine but
$ make test
Build complete.
Don't forget to run 'make test'.
Segmentation fault
Segmentation fault
PHP : /usr/bin/php
CWD : /home/ers/LZMA/xz
Extra dirs :
FAIL Test xzopen() function : basic functionality [tests/xzopen_basic.phpt]
FAIL Test xzopen() function : error conditions [tests/xzopen_error.phpt]
TIME END 2013-11-25 07:35:26
Exts skipped : 0
Number of tests : 3 3
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 3 (100.0%) (100.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Test xzopen() function : basic functionality [tests/xzopen_basic.phpt]
Test xzopen() function : error conditions [tests/xzopen_error.phpt]
You may have found a problem in PHP.
We would like to send this report automatically to the
PHP QA team, to give us a better understanding of how
the test cases are doing. If you don't want to send it
immediately, you can choose "s" to save the report to
a file that you can send us later.
Do you want to send this report now? [Yns]:
Does it support parallel, multi-threaded compression?
Implement LZMA stream filters similar to other compression extensions.
WIll you add support for the compression level?
Something like compress.lzma://
<?php
$fh = fopen('compress.lzma://http://obfuskate.com/test.xz', 'r');
fpassthru($fh);
?>
As I see, there is nobody maintinaing this repo since 2013. Probably it needs new power...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.