no more PHP4

This commit is contained in:
Roland Gruber 2007-08-07 17:47:47 +00:00
parent 7206e7bdc5
commit 82cf42aafc
3 changed files with 30 additions and 53 deletions

View File

@ -13,17 +13,9 @@ Installation Instructions for LAM
- OpenLDAP (>2.0) - OpenLDAP (>2.0)
- A web browser :-) - A web browser :-)
MHash is only needed if you use PHP < 4.3 and if you want to use SHA or SSHA MHash is only needed for Samba password hashes.
for password hashes.
MCrypt will be used to store your LDAP password encrypted in the session file. MCrypt will be used to store your LDAP password encrypted in the session file.
Getting mcrypt and mhash for Suse/RedHat:
Either you compile PHP4 yourself or you use some unofficial packages:
- Suse: ftp://ftp.suse.com/pub/people/poeml/mod_php4
- RedHat: http://ftp.horde.org/pub/RPMS
See docs/README.schema.txt for information about used LDAP schema files. See docs/README.schema.txt for information about used LDAP schema files.
@ -60,7 +52,7 @@ Installation Instructions for LAM
3. Setting up PHP 3. Setting up PHP
LAM runs with PHP4 or PHP5. LAM runs with PHP5.
Needed changes in your php.ini: Needed changes in your php.ini:

View File

@ -3,7 +3,7 @@ LAM - Readme
============ ============
LDAP Account Manager (LAM) manages user, group and host accounts in an LDAP LDAP Account Manager (LAM) manages user, group and host accounts in an LDAP
directory. LAM runs on any webserver with PHP4/5 support and connects to your directory. LAM runs on any webserver with PHP5 support and connects to your
LDAP server unencrypted or via SSL/TLS. LDAP server unencrypted or via SSL/TLS.
Currently LAM supports these account types: Samba 2 and 3, Unix, Kolab 2, Currently LAM supports these account types: Samba 2 and 3, Unix, Kolab 2,
address book entries, NIS mail aliases and MAC addresses. There is a tree address book entries, NIS mail aliases and MAC addresses. There is a tree
@ -20,7 +20,7 @@ LAM - Readme
Tilo Lutz <tilolutz@gmx.de> Tilo Lutz <tilolutz@gmx.de>
Requirements: Requirements:
PHP4/5 PHP5
Openldap (2.0 or greater) Openldap (2.0 or greater)
A web-browser that supports CSS A web-browser that supports CSS

View File

@ -50,8 +50,6 @@ function lamdaemon($commands, $server) {
$userstring = implode ("\n", $commands); $userstring = implode ("\n", $commands);
$output_array = array(); $output_array = array();
if (function_exists('proc_open')) {
// New Code, requires PHP 4.3
$towrite = escapeshellarg($server)." ".escapeshellarg($_SESSION['config']->scriptPath)." - -"; $towrite = escapeshellarg($server)." ".escapeshellarg($_SESSION['config']->scriptPath)." - -";
$descriptorspec = array( $descriptorspec = array(
0 => array("pipe", "r"), // stdin 0 => array("pipe", "r"), // stdin
@ -80,19 +78,6 @@ function lamdaemon($commands, $server) {
} }
fclose($pipes[1]); fclose($pipes[1]);
proc_close($process); proc_close($process);
}
else { // PHP 4.3>
$towrite = escapeshellarg($server)." ".escapeshellarg($_SESSION['config']->scriptPath)." ".
escapeshellarg($ldap_q[0]).' '.escapeshellarg($ldap_q[1]);
$command = escapeshellarg($_SESSION['lampath']."lib/lamdaemonOld.pl")." ".$towrite;
$pipe = popen("echo \"$userstring\"|$command" , 'r');
while(!feof($pipe)) {
//$output .= fread($pipe, 1024);
$output = fgets($pipe, 1024);
if ($output!='') $output_array[] = $output;
}
pclose($pipe);
}
if (sizeof($output_array) > 0) { if (sizeof($output_array) > 0) {
return $output_array; return $output_array;
} }