APR extension
| From: | Michael Wallner | Date: | Tue, 24 Aug 2004 13:21:13 +0000 |
| Subject: | APR extension | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-1208@lists.php.net to get a copy of this message | ||
Hi,
I've written (with gorgeous help of #php.pecl,
thanks Derick & others :) a tiny extension
providing some "Apache Protable Runtime"
utility functions:
* apr_md5(string pass[, string salt])
generate an APR MD5 password hash
* apr_sha(string pass)
generate an APR SHA password hash
* apr_uuid()
generate a UUID
* apr_date([int time])
generate a RFC822 compliant GMT date
* apr_user_get_id(string user)
get uid of user
* apr_user_get_name(int uid)
get user name of uid
* apr_user_get_home(string user)
get users home directory
* apr_group_get_id(string group)
get gid of group
* apr_group_get_name(int gid)
get group name of gid
* apr_current_user()
get current users name
* apr_current_group()
get current groups name
* apr_current_home()
get current users home directory
Its main intention was to provide the APR MD5
hash function, because generating one such
password takes about 0.2+ seconds with plain
PHP (PEAR::File_Passwd::crypt_apr_md5()).
I think I've extracted most useful functions
of APR (that make sense). It was written
against PHP 5.0.1 and Apache 2.0.49
(i.e. apr-0.9.5) on debian/testing.
Source file: http://iworks.at/~mike/apr/apr.c
Package file: http://iworks.at/~mike/apr/apr-0.3.0.tgz
Its config.m4 is pretty basic and assumes that
apr-config and apu-config can be found within
ones $PATH - I've not been able to mangage
that thing better...
It was not tested on Win32 so far.
I've already got an web and cvs account.
Regards,
--
Michael - < mike(@)php.net >
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc