To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > PHP Help > Install

Install Conversation regarding installation and upgrade of PHP

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-27-2000, 08:22 AM   #1
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
PHP4 + WIN32 + OCI

Hello,

I have installed php4 within IIS on a win32 platform (not my choice). Now i like to call my Oracle database with the OCI functions from PHP4. Because i don't have a C compiler i took a precompiled php_oci8.dll from the internet and placed it in my winnt\system32 directory and changed my extension settings in my php.ini file.

extension_dir=c:\winnt\system32
extension=php_oci8.dll

When i try to logon with the OCIPLogon function i get the following error message:

Fatal error: Call to undefined function: ociplogon().

Can someone tell me how to install the php_oci8.dll correctly?

Thanx, Albert




Anon is offline   Reply With Quote
Old 07-05-2000, 07:31 AM   #2
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP4 + WIN32 + OCI

Hi,
Sorry for not answering you what you are looking for, because i´m trying to do the same. But please, could you tell me where did you find the php_oci8.dll?

Thanks
Sergio


P.D. may be this address could help both of us
http://pulsar.jb.com/sklar-php/code83.html

Anon is offline   Reply With Quote
Old 07-10-2000, 10:47 AM   #3
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP4 + WIN32 + OCI

I am also looking for a copy of php_oci8.dll for PHP4... If I can get a copy of this precompiled DLL, I'm sure it would be easier for all of us to figure out any issues with installing/configuring this PHP extension. I'm running Apache 1.3.12 on NT 4.0 (SP5) with PHP 4.0.1 PL2. PHP runs like a champ but without the oci dll, no oracle connection :( Hey, even if I got source code, I would TRY (emphasis on try) compiling it. Worth a shot.
Anon is offline   Reply With Quote
Old 07-10-2000, 10:55 AM   #4
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP4 + WIN32 + OCI

Just found a dist which PERPORTS to contain the oracle dlls.... downloading now. Check out the URL:

http://phpuser.com/download/files/php/PHP_Release_4.0.0_win32_binary_build_23.05.00.zip

to download and unzip. Found this in a previous message thread here on PHP Builder. I'll post my findings soon (hopefully all goes well :))
Anon is offline   Reply With Quote
Old 07-11-2000, 04:07 AM   #5
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP4 + WIN32 + OCI

I think the trick is to have oci.dll, which comes with Oracle8i, in the PHP directory. Am I correct???
Anon is offline   Reply With Quote
Old 07-11-2000, 10:09 AM   #6
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP4 + WIN32 + OCI

Yes, there is mention of having the oci.dll together with the compiled php_oci8.dll. I believe that is a must... however, I'm having trouble getting the php_oci8.dll (or even php_oracle.dll for that matter) to load correctly within my php4.0.1pl2 installation. When I copy the dlls into my extenstions directory (same dir as php.exe) and then add the appropriate "extension=php_oci8.dll" line to my php.ini file (in the WINNT directory), I get an error message from php4ts.dll (I'm running under Apache 1.3.12). PHP.EXE hangs in memory (cannot terminate in the task list).

But, if I re-comment the extension line out, then PHP runs okay. All I'm calling in my test page is phpinfo(). Perhaps I need some additional section code specifically for the oracle extensions, but not sure.

I did notice that certain parts of PHP are VERY version specific... I downloaded an earlier Beta of Zend Optimizer, and when I added this to my php.ini, I got a similar (though not exactly the same) error message. But, once I got a new version of the optimizer, and installed it in the same manner, it ran fine.

I'm coming to the conclusion that in order to get this stuff to work right, you need either 1) a pre-compiled version of php_oci8.dll that is compiled with a particular version of php (when they release subsequent win32 binaries), or 2) re-compile the whole thing yourself.

I do have the latest source code for the php_oci8 extension, so I'm going to TRY (much emphasis) compiling everything myself, and see where that goes.

Anyone else think of other things to try?
Anon is offline   Reply With Quote
Old 07-12-2000, 05:42 AM   #7
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP4 + WIN32 + OCI

Any success in getting PHP4+ApacheWin32+OCI working. Please keep us posted. Best of luck to you Andy :-)
Anon is offline   Reply With Quote
Old 07-12-2000, 10:47 AM   #8
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP4 + WIN32 + OCI

I'll let ya know... I'm in the middle of trying to get my devel environment right (with SQL*Net, etc.)... unfortunately, looks like the easiest way to get these compiled is with MS VC++, but I don't have a copy (probably going to order it tomorrow :))

But I'll be trying this with Borland Compiler 5.5 (free version) and also with Cygwin (to see which one may work better) and I'll certainly keep you all posted.

Ah, to be digging through hardline code once again!
Anon is offline   Reply With Quote
Old 07-27-2000, 04:19 AM   #9
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP4 + WIN32 + OCI

Here are a part of a script you must insert in the first Lines of your Script:
dl("php_oci8.dll"); //important
putenv("ORACLE_SID=orcl"); //important
$conn=ocilogon("Scott","Tiger");

I hope it will help you,

Karsten
Anon is offline   Reply With Quote
Old 07-27-2000, 04:01 PM   #10
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP4 + WIN32 + OCI

It still doesn't work.

I've placed the PHP-files in C:\WINNT\PHP, have my Oracle 8.1.6 DB installed on the same server.

Then I've placed the PHP.INI file in C:\WINNT\ and made sure the following 2 lines were included:
extension_dir = ./ (also tried ./winnt/php)
extension = php_oci8.dll (also tried without)
extension = oci.dll (also tried without)

Off course I restarted the IIS-service with:
net stop iisadmin
net start w3svc

Finally tried this script:
<BODY>
<?php
print("Test...");
dl("php_oci8.dll");
putenv("ORACLE_SID=ORCL");
$c1 = ocilogon("SCOTT","TIGER");
$stmt = ociparse($c1, "select * from dual");
ociexecute($stmt);
?>
</BODY>

which produced this output:
Test...
Fatal error: Unable to load dynamic library './/php_oci8.dll'
The specified module could not be found.

I also tried to replace the dl("php_oci8.dll) with ("oci.dll") which resulted in:
Test...
Warning: Invalid library (maybe not a PHP library) 'oci.dll' in Unknown on line 0

Fatal error: Call to undefined function: ocilogon() in ...

So, I guess it's some wrong compiled library.
Anybody figures what is going wrong?
Thanks in advance,
Walter
Anon is offline   Reply With Quote
Old 07-31-2000, 10:41 PM   #11
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP4 + WIN32 + OCI

hi all,
I encountered the same problem too...sigh
So, at last , I recompiled all the PHP4.0.1pl2 under the instruction from php doc. The compilation seems has some tiny
warning, but it done at last...:-).
The first compilation is a Debug_TS version, which work ok with OCI8. The configuration is something like this:
extention=php_oci8.dll
extention_dir=f:\php-4.0.1pl2\Debug_TS
The phpinfo() show the correct result-- oci8
supported. Then I tried the PHPLIB7.2b which
use db_oci8.inc as the CT_Sql , it work ok.
the DB_Example class has a database "oracle151" which is the service name of my oracle server net8 configure.No
ORACLE_SID needed at my client side.

Then , I tried to recompiled all into a
Release version. But....After all compilation
done, and fix the httpd.conf and php.ini,
the same error appeared again!....
TNS error : service can't resolve
( some matter like this :-( )
seems that the php_oci8.dll can't not pass
the correct service name to oci8.dll....
then , I tried to ommit the database in DB_Example(just let it empty),then php CAN
connect to my local oracle server ....ODD!!..

SIGH....I tried to add some message in the
oci8.c to see whether the corrected string has been passed? It does. Nothing ODD in the
oci8.c code...(??!!)..
At last , the results are:
1. PHP4.0.1pl2 Debug_TS version all goes well.
2. PHP4.0.1pl2 Release_TS version only can
do with empty service name.( NO REMOTE server
support!??)

Maybe the thread safe feature can't work
well with OCI8.dll ???

Sorry for my UGLY English...


Anon is offline   Reply With Quote
Old 08-02-2000, 11:45 AM   #12
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP4 + WIN32 + OCI

Karsten, thanks for the tip :)

Well, I've finally located a pre-compiled version of PHP on the web WITH most of the dlls attached (including OCI and a host of others) - this is a 4.0.2dev compilation so be wary.

http://www.mm4.de/andreas.otto/php_related

I'm still having some trouble with the php_oci8.dll however. I get all my other fun extensions working simply from the supplied dlls (ftp, ldap, zlib), but as soon as I un-comment "extension=php_oci8.dll" in my php.ini, my Apache server craps out (PHP hangs as a process in memory).

My extensions dir is the same as php.exe (c:\phpdev). I've copied the supplied oci.dll into that same directory. I've also copied the supplied php_oci8.dll into my *system32* directory (got a tip on this from the php-windows list on php.net). Apache 1.3.12 on NT 4 SP5 as CGI (not apache module).

So, do I need something else? I don't have oracle installed locally, but up on a network drive... should I have something added to my path to point to this oracle installation? Do I need some additional settings in my include_path of php.ini? Am I missing some [section] code specific to OCI8? Any answers would help.... specifically, if anyone HAS gotten php_oci8.dll to work, specifically how are your files setup (directory locations, etc.)? Hope to get this all worked out soon, and get on with development work :)
Anon is offline   Reply With Quote
Old 08-21-2000, 12:22 PM   #13
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP4 + WIN32 + OCI

Hi folks,

Any luck with this?

I just checked the latest dlls from php4win.de and Apache still gives a GPF when try to load php as a module with oci extension activated.

Regards
Anon is offline   Reply With Quote
Old 08-22-2000, 10:20 AM   #14
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP4 + WIN32 + OCI

As we've worked this through here 8 ways from Sunday... there are a few KEY points which you need to check to get the oci8 extension to work correctly, in either CGI or Apache mod mode.

1) MOST IMPORTANT: you *must* have the latest version of the oracle client software installed on the server... Oracle Client 8.1.6 is what was used when compiling the php_oci8.dll. The extension is very specific to this version of client drivers/software. This is a free (though VERY BIG) download from technet.oracle.com (~170 MB).

2) Are you using the full set of files from php4win.de? Again, extensions are also specific to a compiled version of php4... if you want to use their php_oci8, then you also have to run THAT compiled version of php4.0.2dev. Also, bear in mind that this is a development compilation, not a production release.

3) Can you connect to your oracle database through other software, such as ODBC... also, can you successfully test your database connection inside Net8? This will help to narrow any problems you're having down to either oracle itself, or to php4/apache/php_oci8.
Anon is offline   Reply With Quote
Old 08-24-2000, 05:02 AM   #15
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP4 + WIN32 + OCI

Can I recompile php_oci8.dll to make it run with my OCI 8.0.5 ?

If yes, where can I find the source code (for MS VC++) ?

thx
Anon is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 01:41 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.