Have you tried oci_pconnect() instead of ocilogon()?

Also, I have encountered some issues on Win32 with the instant client
and PHP5.
Try installing the full client and testing again.

Neil Morgan

-----Original Message-----
From: Fortuno, Adam [mailto:[EMAIL PROTECTED] 
Sent: 24 November 2008 21:40
Subject: [PHP-DB] Unable to Login to Oracle 9i-R2 Database Using PHP


I'm running PHP in ISAPI mode with IIS accessing (or attempting to
access) an Oracle 9i database on a RedHat box. Here are the versions of

Web Server: IIS v5.1
PHP: 5.2.5
Database: ORACLE v9i-R2

I am attempting to load a page with the following code:

//Database credentials
$username = "MyUser";
$passwd = "MyPassword";

//Return the database connection
OCILogon($username, $passwd, $db);

I receive an error stating, "Fatal error: Call to undefined function
OCILogon() in C:\Documents and Settings\afortuno\My
Documents\Dev\DBAIntranet\ghr_resources\transaction_report\adam.php on
line 7"

I'm able to use SQL Plus to login to the database I'm interested in.
This gives me the impression that my credentials are not the problem;
however, the plumbing between PHP and Oracle is the culprit. 

I initially had problems loading the OCI extension DLL. I resolved the
issue by installing the Oracle 10g instant client. Here are the steps I
followed as part of that process:

(1) Download Oracle Instant Client Package Basic (v10.2.0.4) for Win32

(2) Unzip the contents downloaded zip-file.
(3) Move the folder to the "C:\Oracle" directory.
(4) Add the new folder (C:\oracle\ora102ic) to the PATH.
(5) Restart IIS (e.g., C:\> iisreset).

The error message couldn't be more vague, and I'm not experienced enough
with Oracle, IIS, or PHP to know where to turn for more insight. Any
help would be appreciated.


PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to