PHP's shell_exec function will execute your command under a non-login user. This just means that $PATH & other environment variables that you would expect would not be provided.
Just be explicit about where your mpirun
is located, and use absolute paths to ensure MPI knows what your talking about.
Example:
/usr/local/bin/mpirun -np 64 -hostfile /home/hostfile17 /full/path/paralelo 1 /mpi/image.bmp /mpi/out.bmp