Click to See Complete Forum and Search --> : getting error oci_connect


thread_PHP
05-17-2008, 04:08 AM
Fatal error: Call to undefined function oci_connect() in C:\Program Files\Apache Group\Apache2\htdocs\oracleconnect.php on line 2


<?php
$conn = oci_connect('crimecog','test') or die;


$sql = 'BEGIN sayHello(:name, :message); END;';

$stmt = oci_parse($conn,$sql);

// Bind the input parameter
oci_bind_by_name($stmt,':name',$name,32);

// Bind the output parameter
oci_bind_by_name($stmt,':message',$message,32);

// Assign a value to the input
$name = 'Harry';

oci_execute($stmt);

// $message is now populated with the output value
print "$message\n";
?>

Weedpacket
05-17-2008, 04:19 AM
Step 1: Read the instructions (http://www.php.net/oci8).
Step 2: Follow them.

thread_PHP
05-17-2008, 04:22 AM
hi weedpacket
thank you for your reply i want to use the following procedures functions for my application they are similar to my requirement


http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks_sps.html

thread_PHP
05-17-2008, 08:32 AM
hi weedpacket
in the php.ini
what should i change

extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_pdo.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
;extension=php_pdo_mysql.dll
extension=php_pdo_oci.dll
extension=php_pdo_oci8.dll
extension=php_pdo_odbc.dll

i have made the above changes

then when i keep this
extension=php_oci8.dll (removing the ;) apache 2.2 version i am using is not starting

when i keep like this below in php.ini apache 2.2 is working properly

;extension=php_oci8.dll

extension=php_pdo_oci.dll
extension=php_pdo_oci8.dll
extension=php_pdo_odbc.dll

Hope you understood my problem

thanks in advance