pHash-0.9.6 was released at 2013-04-23, but there are 2 major problems for certain usage, so I patches:
- Compatible with new PHP version (Compile/Install passed).
- Change
ph_dct_imagehash()
function to return hash string for further operation.
$ sudo apt-get install libavformat-dev libmpg123-dev libsamplerate-dev libsndfile-dev
$ sudo apt-get install cimg-dev libavcodec-dev ffmpeg libswscale-dev
$ cd pHash-0.9.6a
$ ./configure
$ make && sudo make install
$ cd bindings/php
$ phpize
$ ./configure LIBS="-lpthread"
$ make && sudo make install
$ sudo vi /etc/php5/conf.d/pHash.so
extension=pHash.so
$ sudo php5enmod pHash
$ php -m
pHash