Download the PHP package ozanhazer/php-htpasswd without Composer
On this page you can find all versions of the php package ozanhazer/php-htpasswd. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download ozanhazer/php-htpasswd
More information about ozanhazer/php-htpasswd
Files in ozanhazer/php-htpasswd
Download ozanhazer/php-htpasswd
More information about ozanhazer/php-htpasswd
Files in ozanhazer/php-htpasswd
Vendor ozanhazer
Package php-htpasswd
Short Description A lightweight - single class - library to read and write htpasswd. You can add or delete users or you can update their passwords...
License MIT
Homepage https://github.com/ozanhazer/PHP-Htpasswd
Package php-htpasswd
Short Description A lightweight - single class - library to read and write htpasswd. You can add or delete users or you can update their passwords...
License MIT
Homepage https://github.com/ozanhazer/PHP-Htpasswd
Please rate this library. Is it a good library?
Informations about the package php-htpasswd
PHP-Htpasswd
PHP Htpasswd writer for Apache. You can add or delete users, or update their passwords.
Features
- Supports
crypt
,md5
andsha1
algorithms - Locks the htpasswd file to prevent conflicts while writing.
- Throws an error on invalid usernames.
- Unit tested.
- Whole htpasswd file is read into the memory so be careful if you have lots of users (In fact you should consider a different kind of authentication mechanism if you have that many users)
Usage
Install: composer require ozanhazer/php-htpasswd
Apache htpasswd can be encrypted in three ways: crypt (unix only), a modified version of md5 and sha1. You can define the encryption method when you're setting the password:
(Yes, you may use different algorithms per user in the same passwd file...)
See the Apache documentation for encryption details.
Tips
- Do not prefer
ENCTYPE_CRYPT
on Windows servers since it's not available on Windows by default. ENCTYPE_CRYPT
passwords are limited to 8 characters and extra characters will be ignored so the library will trigger a notice if long passwords are provided.
All versions of php-htpasswd with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.2|^8.0
The package ozanhazer/php-htpasswd contains the following files
Loading the files please wait ....