title: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.12.1
body: <p>When trying to run a perl script that creates a new oracle database from a PHP web page, an error is raised.</p>
  
  <ul>
  <li>My PHP page is hosted at linux server (centos7)</li>
  <li><p>Updated the following environment variables:</p>
  
  <p><code>export ORACLE_HOME=oracle home path
  export LD_LIBRARY_PATH=$ORACLE_HOME/lib
  export PATH=$ORACLE_HOME/bin:$PATH</code></p></li>
  <li><p>The perl tool is executed from PHP code after clicking on a HTML button:</p>
  
  <p><code>exec("perl scriptName.pl" )</code></p></li>
  <li><p>The following error is raised:</p>
  
  <blockquote>
    <p>install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.12.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 190.
    at (eval 17) line 3.
    Compilation failed in require at (eval 17) line 3.
    Perhaps a required shared library or dll isn't installed where expected
    at (eval 10) line 22698.</p>
  </blockquote></li>
  <li><p>Even though running the perl script alone without calling from web php page by executing: <code>"perl script.pl"</code> on the linux server, the code executed and no errors raised.</p></li>
  </ul>