Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PHP- Oracle not working- Call to undefined function OCILogon() ERROR

558661Apr 3 2007 — edited Apr 4 2007
Hi,

I am trying to just do a test program to test php - oracle connection,
My versions are: php5.2.1-Win32 and Oracle 10g

I have made the following settings:
1.) Uncommented the following lines in php.ini:
extension=php_oci8.dll
extension=php_oracle.dll
2.) Set extension_dir = "C:\php-5.2.1-Win32\ext"

Changed the httpd.conf file as: ADDED
1.)LoadModule php5_module C:/php-5.2.1-Win32/php5apache2.dll
2.)PHPIniDir "C:/Program Files/Apache Group/Apache2/conf-"
3.) LoadFile "C:/php/php5ts.dll"

4.)<IfModule php5_module>

<Location />
AddType text/html .php .phps
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps
</Location>

</IfModule>

5.) AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps

But when I am tryin to run the following program:

<?php
echo "<h1>OCI Test</h1>\n";
$conn=OCILogon("system", "sheetal16", "orcl");

$stmt = OCIParse($conn, "SELECT table_name FROM user_tables ORDER BY table_name");
OCIExecute($stmt, OCI_DEFAULT);
while (OCIFetch($stmt)) {
$table_name = OCIResult($stmt, "TABLE_NAME");
echo "$table_name<br />\n";
}
OCIFreeStatement($stmt);
OCILogoff($conn);
?>

I am getting the following error:

OCI Test
Fatal error: Call to undefined function OCILogon() in C:\Program Files\Apache Group\Apache2\htdocs\test2.php on line 3

Please help me to solve this problem.

Thanks,
Sheetal
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 2 2007
Added on Apr 3 2007
1 comment
2,670 views