I asked some help at Docuware , Florian M. was able to help me out.
The passhrase needs to be utf8 encoded and the hash needs an extra parameter, set to true, needed for raw output
$key = utf8_encode('password1234');
$passphrase = hash('sha512', $key, true);
Then one more change:
$encrypted = openssl_encrypt($param, 'aes-256-cbc', $encryption_key, 0, $iv);
Change the 0 to OPENSSL_RAW_DATA
$encrypted = openssl_encrypt($param, 'aes-256-cbc', $encryption_key, OPENSSL_RAW_DATA, $iv);
For me it works now! (-:
Hope it helps you also!