RE: [PHP-DB] Unable to Login to Oracle 9i-R2 Database Using PHP 5.2.5

[email protected] ("Fortuno, Adam")
Newsgroups php.db
Message-ID <CED447ECB4C001419947EBF4776E503203ADB12D@ghrintallmsg2.CORPORATE.GHRSYS.AD>
Chris/Rick,

Thank you both for the notes. I sincerely appreciate the help.

Chris, I've got a "php_oci8.dll" file sitting in my extensions directory
(C:\php\ext) - see below.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=-=
 Console Output
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=-=

C:\PHP\ext>dir
Volume in drive C has no label.
Volume Serial Number is 84DF-21C4

Directory of C:\PHP\ext

11/24/2008  02:59 PM    <DIR>          .
11/24/2008  02:59 PM    <DIR>          ..
11/08/2007  11:23 PM            41,019 php_crack.dll
11/08/2007  11:23 PM            28,732 php_ntuser.dll
11/08/2007  11:23 PM           102,458 php_oci8.dll
              3 File(s)        172,209 bytes
              2 Dir(s)  40,158,838,784 bytes free

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=-=

As best I can tell, I've correctly set my extensions directory
(C:\php\ext) and I've called the oci8 DLL correctly - see below.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=-=
 php.ini Snipet
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=-=

C:\PHP\ext>type ..\php.ini | grep -in php_oci
1293:[PHP_OCI8]
1294:extension=php_oci8.dll

C:\PHP\ext>type ..\php.ini | grep -in \\ext
536:extension_dir ="C:\PHP\ext"

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=-=

Let me know if I've mucked that up.

Rick, when I delve into the php_info() shmaz, I see this snipet - see
below. I'm not sure if I should be looking for something else or not.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=-=
 PHP information
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=-=

C:\PHP\ext>php -i

...stuff...

oci8

OCI8 Support => enabled
Version => 1.2.4
Revision => $Revision: 1.269.2.16.2.38 $
Active Persistent Connections => 0
Active Connections => 0
Temporary Lob support => enabled
Collections support => enabled

Directive => Local Value => Master Value
oci8.default_prefetch => 10 => 10
oci8.max_persistent => -1 => -1
oci8.old_oci_close_semantics => 0 => 0
oci8.persistent_timeout => -1 => -1
oci8.ping_interval => 60 => 60
oci8.privileged_connect => Off => Off
oci8.statement_cache_size => 20 => 20

...other stuff...

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=-=

If I take the page that is generating the error and move it to my Redhat
box running PHP 5.0.2, I have no problem. If I use it locally, I get the
error. 

What am I missing here?

Cheers,
A-


-----Original Message-----
From: Chris [mailto:[email protected]] 
Sent: Monday, November 24, 2008 4:56 PM
To: Fortuno, Adam
Cc: [email protected]
Subject: Re: [PHP-DB] Unable to Login to Oracle 9i-R2 Database Using PHP
5.2.5


> //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"

<snip>

> 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.

The error is pretty clear.

You're trying to call a function that doesn't exist.

Tracing it backwards, the php_oci.dll (or php_oci8.dll) isn't being
loaded.

Search for oci8 here: http://pecl4win.php.net/

and grab the dll file.

There are some notes 
http://www.php.net/manual/en/install.windows.extensions.php about how to

install this.

-- 
Postgresql & php tutorials
http://www.designmagick.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.