Re: [PHP] iterating over /etc/group
Hi Arcady! On Wed, 04 Jul 2001, Arcady Genkin wrote: [EMAIL PROTECTED] writes: On Wed, 04 Jul 2001, Arcady Genkin wrote: Does PHP provide no high-level means of iterating over the UNIX /etc/group file, a la getgrent() C function? The task is to figure out all groups that a user is in on a system with PHP in _safe mode_ (hence, cannot read from /etc/group directly). Am I overlooking something? system (/usr/bin/id $user -G); Thanks, but this would not work in safe mode. I solved the problem by having a cron job making a local copy of /etc/group once in a while; my script then goes through it line by line to extract the groups. But this is a hack... well, why exactly do you need the groups from /etc/group again? maybe there's a different way to do it. -- teodor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] iterating over /etc/group
Hi Arcady! On Wed, 04 Jul 2001, Arcady Genkin wrote: Does PHP provide no high-level means of iterating over the UNIX /etc/group file, a la getgrent() C function? The task is to figure out all groups that a user is in on a system with PHP in _safe mode_ (hence, cannot read from /etc/group directly). Am I overlooking something? system (/usr/bin/id $user -G); -- teodor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] iterating over /etc/group
Does PHP provide no high-level means of iterating over the UNIX /etc/group file, a la getgrent() C function? The task is to figure out all groups that a user is in on a system with PHP in _safe mode_ (hence, cannot read from /etc/group directly). Am I overlooking something? Many thanks, -- Arcady Genkin i=1; while 1, hilb(i); i=i+1; end -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]