What happens if you encrypt in Javascript and try to decrypt in PHP? Does that work?
If not then if you could post the ciphertext produced by Java that'd be helpful. That'd give us a chance to breakdown the encoding of the plaintext and see which padding method - if any - is being used.
That said, in lieu of having that, my guess, off hand, would be that you need to do $rsa->setEncryptionMode(CRYPT_RSA_ENCRYPTION_PKCS1)
.