After some trial and error, I found the answer to the issue. I installed oci8 with
PECL instead of using
yum and the REMI repository, but I think this should work for installing it with yum too.
Solution: turn selinux off (put it in permissive mode). This is actually oracle's suggested solution. You have to turn it off before installation to get it to install properly, and keep it off to get it to work properly.