Back in the day, I had to run Perl code that was using DBD::Oracle on many UNIX platforms, Linux included. Running ldconfig should have done it, did you make sure and restart Apache after you ran ldconfig? The running web server won't have the new settings until you do that.
If that doesn't do it, then what you might want to do is to add an explicit SetEnv in your httpd.conf - I remember having to do this too. See mod_env describing SetEnv for Apache 2.4.