I have now solved the problem with the incompatible AES256-CBC encryption under wine with a workaround: Since the AES256-CTR encryption in wine is compatible with the encryption on Windows (and thus also PHP), I now always encrypt with CTR by default and only use a fallback to CBC for old Windows versions that do not yet support CTR. Of course, the PHP script has to be adapted correspondingly so that it supports both encryptions. Not a particularly nice or clean solution, but it works.