Hi All,
I am doing a project where I need to connect to Oracle database from PHP.
My Oracle db and apache server is running on Solaris.
Whenever I run a PHP script with ocilogon I got this err msg:
Fatal error: Call to undefined function: ocilogon() in ...
My PHP script:
<html>
<body>
<h1>PHP OCI ServerVersion Test</h1>
<p>
<?php
$conn = OCILogon("scott","tiger","mydb");
print "Server Version: " . OCIServerVersion($conn);
OCILogOff($conn);
?>
</p>
</body>
</html>
Addtional Info:
I have configured PHP module on Solaris with this option:
--with-apxs --with-oracle=/oracle8i/u01/app
The compilation of PHP module is successful and loaded into Apache.
====================
When I run phpinfo() in apache, I got this on Oracle section:
Oracle Support enabled
Oracle Version 8.1
Compile-time ORACLE_HOME /oracle8i/u01/app
Libraries Used no value
====================
I have put in this line into apachectl
ORACLE_HOME=/oracle8i/u01/app
I have tried to export the env string also in the shell
export ORACLE_HOME=/oracle8i/u01/app
====================
Anything else I missed out? Please help!!!
Regards,
CH