conan318 Posted May 2, 2012 Share Posted May 2, 2012 Hi i am running a wamp server on windows 7 i am trying to php exec command to run a command but the output returns 1 does this mean the cmd failed to execute ? $openssl_cmd = "($OPENSSL mime -sign -signer $MY_CERT_FILE -inkey $MY_KEY_FILE ". "-outform der -nodetach -binary <<_EOF_\n$data\n_EOF_\n) | " . "$OPENSSL smime"." -encrypt -des3 -binary -outform pem $PAYPAL_CERT_FILE"; Link to comment https://forums.phpfreaks.com/topic/261928-php-exec-output-returns-1-what-does-this-mean/ Share on other sites More sharing options...
conan318 Posted May 2, 2012 Author Share Posted May 2, 2012 sorry left some of the code out. exec($openssl_cmd, $output, $error); if (!$error) { return implode("\n",$output); } else { return "ERROR: encryption failed"; } Link to comment https://forums.phpfreaks.com/topic/261928-php-exec-output-returns-1-what-does-this-mean/#findComment-1342171 Share on other sites More sharing options...
conan318 Posted May 2, 2012 Author Share Posted May 2, 2012 just did a var_dumb of the $openssl_cmd string '(c:\wamp\bin\apache\Apache2.2.21\bin\openssl.exe mime -sign -signer c:\wamp\www\freelance-pacific\pubcert.pem -inkey c:\wamp\www\freelance-pacific\prvkey.pem -outform der -nodetach -binary <<_EOF_ cmd=_xclick [email protected] cert_id=TY3BA373455JS6 lc=AU custom=158 invoice=freelance-pacific currency_code=AUD no_shipping=1 item_name=freelance-pacific item_number=1 amount=104.99 bn=StellarWebSolutions.PHP_EWP2 _EOF_ ) | c'... (length=650) var_dump on $output array empty var_dum on $error int 1 Link to comment https://forums.phpfreaks.com/topic/261928-php-exec-output-returns-1-what-does-this-mean/#findComment-1342172 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.