PHP

= Create a password for a .htpasswd file using PHP = htaccesstools $clearTextPassword = 'some password';  // Password to be encrypted for a .htpasswd file $password = crypt($clearTextPassword, base64_encode($clearTextPassword)); echo $password;

= Running a perl script from PHP =

- needed to run the shell execution commands in php.
 * Turn On the safe mode settings in php.ini

Give all permissions to web server on the perl script (user owner and user group) e.g. apache shell_exec("perl filename.pl arg1"); passthru("perl filename.pl arg1"); exec("perl filename.pl arg1"); or $var = `perl filename.pl arg1`;
 * Check permission of perl script