Author Archives: itdoctor - Page 26

Convert PFX to PEM

$pfx_file=""; $password="dailyithlep"; $pem_file=""; convert_pfx_file_to_pem($pfx_file,$password,$pem_file,true); function convert_pfx_file_to_pem($pfx_file,$password,$pem_file,$remove_password=true) { $CERT_FILE="/"; $CA_CERT_FILE="/"; $PRIVATE_KEY="/"; $PRIVATE_KEY_NOPASSWORD="/"; //get the certificate file from pfx file $cmd=”openssl pkcs12 -clcerts -nokeys -in \”$pfx_file\” -out $CERT_FILE -passin pass:$password”; shell_exec($cmd);...
Continue Reading

Linux: cronjob

When you setup a cronjob file (/) , the file should include the path below: PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin this is because if you don’t set the path, some command might not...
Continue Reading