When I execute check.php to connect and fetch records from database, I am getting the below error.
Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries in /opt/lampp/htdocs/check.php on line 3
The LD_LIBRARY_PATH and ORACLE_HOME has been set
Most likely the environment variables haven't been set in the right place, or there a locale mismatch.
There are various tips in The Underground PHP and Oracle Manual on how to set the environment.
If you want to followup with any further questions, post details about what you done, versions, platforms etc to the PHP OTN forum: PHP