Installation
Debian / Ubuntu
Install the prebuilt package from GitHub Releases. The .deb ships the extension and enables it for your system PHP via phpenmod.
wget https://github.com/AllanGallop/libphp_imagehash/releases/latest/download/php-imagehash-amd64.deb
sudo apt install ./php-imagehash-amd64.debRestart PHP or your web server if the extension does not show up immediately (for example after installing under PHP-FPM or Apache).
TIP
The package targets amd64 Linux. See releases for version-specific artifacts.
Install manually
If you prefer not to use the .deb, download a prebuilt extension from releases (for example php_imagehash-linux-x86_64-php83.so) and add it to php.ini:
extension=/path/to/php_imagehash-linux-x86_64-php83.soRestart PHP or your web server after changing php.ini.
Build from source
For development or platforms without a release artifact:
git clone https://github.com/AllanGallop/libphp_imagehash.git
cd libphp_imagehash
cargo build --releaseThen load the built extension in PHP.
WARNING
The exact extension filename and PHP config path depend on your build environment. Replace the paths with your real output path.
extension=/path/to/libphp_imagehash/target/release/libphp_imagehash.soVerify
php --ri imagehashor:
php -m | grep imagehash