PHP with Oracle

I am personally working on a Project, that has web UI having Apache server, PHP on server side and Oracle as database. For this I need to configure PHP so that it can talk to my Oracle database. The first error I got while querying the database using PHP was. For this, we need to first install php5-pear and then using pecl, we need to install OCI8. As I am using openSUSE 13.2 Then install OCI8 extension for PHP This will install and compile oci8 module. This command will ask for ORACLE HOME location. If everything goes fine, this will end like Add the line to your /etc/php/apache2/php.ini and /etc/php/cli/php.ini Then restart Apache server After this when I tried to access Oracle, I got the error “Call to undefined function oci_connect()” again! When I checked in /var/log/apache2/err_log, I found this: So even though the file is present at $ORACLE_HOME/lib, I still get this error. To get over this error, we need two more steps. Create a file /etc/ and add this line it: and run “ldconfig”. Restart your Apache server again, and this time things should work!

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.