[PHP-DB] Error when trying to connecting to an Oracle database

2006-09-26 Thread Janet Smith
I am trying to use a program written in PHP but connect to an Oracle
database. 

We have a function as follows:

function dbconnect($db, $username, $password)
{
global $siteadmin;
global $db;

// $bob = @mysql_connect($db, $username, $password);
//$bob= oci_connect($username, $password, $db);
// mysql_select_db($db, $bob);
$bob = oci_connect(, , devl);
echo $bob;
return $bob;
}

where  is replaced with a username and  is replaced with a
password. We get the following error:

Fatal error: Call to undefined function: oci_connect() in
/www/WEBUSERS/ics2004/public_html/PHP/Project Manager/dba_copy(1).php on
line 52

Line 52 is $bob = oci_connect(, , devl);

Can anyone tell me why I am getting this error?

Thanks


Jan Smith
Programmer Analyst
Indiana State University
Terre Haute, Indiana
Phone: (812) 237-8593
Email: [EMAIL PROTECTED]

***
This email, and any attachments, thereto, is intended only for use by
the addressee(s) named herein and may contain privileged and/or
confidential information.  If you are not the intended recipient of this
email, you are hereby notified that any dissemination, distribution or
copying of this email, and any attachments thereto, is strictly
prohibited.
***

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Error when trying to connecting to an Oracle database

2006-09-26 Thread Tony Grimes
Hi Janet,

This is a PHP 5 only function. Are you running PHP 5? If not, try using
ocilogon() instead. If you are running 5, then maybe the Oracle library
wasn't included when PHP was compiled.

HTH,
Tony


On 9/26/06 2:13 PM, Janet Smith [EMAIL PROTECTED] wrote:

 I am trying to use a program written in PHP but connect to an Oracle
 database. 
 
 We have a function as follows:
 
 function dbconnect($db, $username, $password)
 {
global $siteadmin;
global $db;
 
// $bob = @mysql_connect($db, $username, $password);
//$bob= oci_connect($username, $password, $db);
// mysql_select_db($db, $bob);
$bob = oci_connect(, , devl);
   echo $bob;
 return $bob;
 }
 
 where  is replaced with a username and  is replaced with a
 password. We get the following error:
 
 Fatal error: Call to undefined function: oci_connect() in
 /www/WEBUSERS/ics2004/public_html/PHP/Project Manager/dba_copy(1).php on
 line 52
 
 Line 52 is $bob = oci_connect(, , devl);
 
 Can anyone tell me why I am getting this error?
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Error when trying to connecting to an Oracle database

2006-09-26 Thread Tony Grimes
Hi Janet,

This is a PHP 5 only function. Are you running PHP 5? If not, try using
ocilogon() instead. If you are running 5, then maybe the Oracle library
wasn't included when PHP was compiled.

HTH,
Tony


On 9/26/06 2:13 PM, Janet Smith [EMAIL PROTECTED] wrote:

 I am trying to use a program written in PHP but connect to an Oracle
 database. 
 
 We have a function as follows:
 
 function dbconnect($db, $username, $password)
 {
global $siteadmin;
global $db;
 
// $bob = @mysql_connect($db, $username, $password);
//$bob= oci_connect($username, $password, $db);
// mysql_select_db($db, $bob);
$bob = oci_connect(, , devl);
   echo $bob;
 return $bob;
 }
 
 where  is replaced with a username and  is replaced with a
 password. We get the following error:
 
 Fatal error: Call to undefined function: oci_connect() in
 /www/WEBUSERS/ics2004/public_html/PHP/Project Manager/dba_copy(1).php on
 line 52
 
 Line 52 is $bob = oci_connect(, , devl);
 
 Can anyone tell me why I am getting this error?
 
 Thanks
 
 
 Jan Smith
 Programmer Analyst
 Indiana State University
 Terre Haute, Indiana
 Phone: (812) 237-8593
 Email: [EMAIL PROTECTED]
 
 **
 *
 This email, and any attachments, thereto, is intended only for use by
 the addressee(s) named herein and may contain privileged and/or
 confidential information.  If you are not the intended recipient of this
 email, you are hereby notified that any dissemination, distribution or
 copying of this email, and any attachments thereto, is strictly
 prohibited.
 **
 *

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php