Craig79 Posted December 27, 2008 Share Posted December 27, 2008 Hello, I'm running CentOS on a VPS. Openssl is indeed located at /usr/bin/openssl. The problem is that my script keeps saying it can't find it. Here's the script: ------------------------------------------------------------------------- //Sample PayPal Button Encryption: Copyright 2006,2007 StellarWebSolutions.com //Not for resale - license agreement at //http://www.stellarwebsolutions.com/en/eula.php //Updated: 2007 04 04 $custom = stripslashes(trim($_POST['custom'])); #Set home directory for OpenSSL //putenv("HOME=~"); putenv("HOME=/home/admin/domains/xxx.com/public_html/temp/"); // xxx is fake! # private key file to use $MY_KEY_FILE = "/home/admin/my-prvkey.pem"; # public certificate file to use $MY_CERT_FILE = "/home/admin/my-pubcert.pem"; # Paypal's public certificate $PAYPAL_CERT_FILE = "/home/admin/paypal_cert.pem"; # path to the openssl binary $OPENSSL = "/usr/bin/openssl"; // stuff here... function paypal_encrypt($hash) { //Sample PayPal Button Encryption: Copyright 2006,2007 StellarWebSolutions.com //Not for resale - license agreement at //http://www.stellarwebsolutions.com/en/eula.php global $MY_KEY_FILE; global $MY_CERT_FILE; global $PAYPAL_CERT_FILE; global $OPENSSL; if (!file_exists($MY_KEY_FILE)) { echo "ERROR: MY_KEY_FILE $MY_KEY_FILE not found\n"; } if (!file_exists($OPENSSL)) { echo "ERROR: OPENSSL $OPENSSL not found\n"; } --------------------------------------------------------------------------------- ...and the last line is where I get the error message echo'd out. I'm using DirectAdmin and my username is 'admin' so my files are located at /home/admin/domains/xxx.com/public_html/ openssl is definitely there, but PHP can't seem to find it. Could someone please tell me why? Thanks! Link to comment https://forums.phpfreaks.com/topic/138513-solved-cant-get-script-to-find-openssl/ Share on other sites More sharing options...
Craig79 Posted December 27, 2008 Author Share Posted December 27, 2008 SOLVED: Turns out that my openssl version is 0.9.8b. This is a bug with that version. I hope I can save someone else 12 hours of searching! Link to comment https://forums.phpfreaks.com/topic/138513-solved-cant-get-script-to-find-openssl/#findComment-724341 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.