Skip to Main Content

PHP Startup errors - Unable to load dynamic library oci8.so

kjcDec 19 2012 — edited Dec 20 2012
I am trying to run the following simple php script:

<?php
$db = oci_connect("userId","password","//ipAddress:port/sid");
if ( !$db ) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
$stmt_getPrinter = oci_parse($db, "select distinct printer from persons_printers where Machine_Name = '%PC-JZP%'");
oci_execute($stmt_getPrinter);

$status = OCIFetch($stmt_getPrinter);
if ( $status ) {
echo htmlentities("successful fetch<br>");
}
else{
echo htmlentities("fetch failed<br>");
}
?>

When I try to run the script above php -f testConn4.php

I get the following errors/warnings

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/oci8.so' - /usr/lib/php/modules/oci8.so: undefined symbol: core_globals_id in Unknown on line 0
*
*
*<b>Warning</b>: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/oci8.so' - /usr/lib/php/modules/oci8.so: undefined symbol: core_globals_id in <b>Unknown</b> on line <b>0</b>
*
PHP Fatal error: Call to undefined function oci_connect() in /share_area/www/docs/testConn4.php on line 2

Fatal error: Call to undefined function oci_connect() in /share_area/www/docs/testConn4.php on line 2


Runing Oracle 11g Enterprise Edition Release 11.2.0.1.0
PHP Version 5.4.9
PHPInfo() shows the following
OCI8 Suport: enabled
Version: 1.4.9

The OCI8.so file is located in the folder /usr/lib/php/modules with the correct privileges.

Any Ideas why I am getting these errors/warnings?

Thanks!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Jan 17 2013
Added on Dec 19 2012
3 comments
9,803 views