Did you compile the lib for the right architecture of your server?
Code:
$ file /lib/x86_64-linux-gnu/libssl.so.1.0.0
/lib/x86_64-linux-gnu/libssl.so.1.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked,
$ file /lib/i386-linux-gnu/libssl.so.1.0.0
/lib/i386-linux-gnu/libssl.so.1.0.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked,
> fp=fopen("/home/ubuntu/Documents/test_decrypt.txt","a+");
You also need to pick a directory that actually exists on the server.
In addition, make sure that directory is writeable by the UID(s) of the processes which make use of the library.