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

2008-11-26 Thread Fortuno, Adam
Chris/Rick/Neil,

I put together a test page (test.php) with content ?php php_info(); ?.
When the page is displayed, I don't see anything related to OCI8. To
Rick's point, the module isn't being uploaded. I believe I know why it
isn't loading. I don't believe the ISAPI PHP module is loading the right
PHP.ini (ini) file. When I run php at the CLI, it loads the ini in the
same directory as PHP's executable (c:\php\) i.e., it loads
c:\php\php.ini. 

C:\php --ini
Configuration File (php.ini) Path: C:\WINDOWS
Loaded Configuration File: C:\PHP\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:  (none)

When I look at the php information displayed by my test page, it looks
like php is looking for an ini-file in the C:\Windows\ directory.

Configuration File (php.ini) Path - C:\WINDOWS
Loaded Configuration File - (none)

This gets better. When process the page on the CLI (e.g., php -f
file), it processes without an issue. As stated before, it (the same
page) fails when processed thru IIS.

I need to do some more work to get this fixed, but your comments were a
big help. Thanks! 

A-

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2008 5:54 PM
To: Fortuno, Adam
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Unable to Login to Oracle 9i-R2 Database Using PHP
5.2.5


 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.

Try doing this from a web page. Maybe it has a different php.ini or 
something.

Anything in the IIS error log (probably goes to the windows logs) ?

-- 
Postgresql  php tutorials
http://www.designmagick.com/


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



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

2008-11-25 Thread N . A . Morgan
Adam,

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
To: php-db@lists.php.net
Subject: [PHP-DB] Unable to Login to Oracle 9i-R2 Database Using PHP
5.2.5

All:

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
everything:

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;
$db=DBName;

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

http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/
winsoft.html

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

Cheers,
Adam

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



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

2008-11-24 Thread Chris



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


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



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

2008-11-24 Thread Fortuno, Adam
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\extdir
Volume in drive C has no label.
Volume Serial Number is 84DF-21C4

Directory of C:\PHP\ext

11/24/2008  02:59 PMDIR  .
11/24/2008  02:59 PMDIR  ..
11/08/2007  11:23 PM41,019 php_crack.dll
11/08/2007  11:23 PM28,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\exttype ..\php.ini | grep -in php_oci
1293:[PHP_OCI8]
1294:extension=php_oci8.dll

C:\PHP\exttype ..\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\extphp -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: php-db@lists.php.net
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/


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



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

2008-11-24 Thread Chris



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.


Try doing this from a web page. Maybe it has a different php.ini or 
something.


Anything in the IIS error log (probably goes to the windows logs) ?

--
Postgresql  php tutorials
http://www.designmagick.com/


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