Jump to content
The Uniform Server Community
Sign in to follow this  
xialucard

how to setup oci8?

Recommended Posts

sir, how can i setup OCI8 in uniserver

 

Oracle Database.

I have never used Oracle or even set it up to run on UniServer however that said to enable PHP support for Oracle looks relatively easy.

 

I will assume you do not have a copy of php_oci8.dll (from PHP Version 5.2.3)

 

1) Download zip PHP Version 5.2.3 from

 

http://uk3.php.net/get/php-5.2.3-Win32.zip/from/a/mirror

 

2) Un-zip to any location (folder)

 

3) Look for the file php_oci8.dll located in folder:

 

*\php-5.2.3-Win32\ext (location step 2)

 

4) Copy this file to UniServer folder:

 

*\Uniform Server\udrive\usr\local\php\extensions

 

5) Open the file php.ini located in folder:

*\Uniform Server\udrive\usr\local\php

 

6) Locate the line:

;extension=php_oci8.dll

and change it to this:

extension=php_oci8.dll

 

7) Re-start the servers and check PHP info from apanel you will see an entry

 

OCI8 Support : enabled

Revision: (whatever)

 

I will leave the testing for you.

 

All the best

Ric :)

Share this post


Link to post
Share on other sites

This is not a complete solution. Implementing the suggested changes onlt results in the following errors:

OCI.dll was not found.

Where is the OCI.dll defined and how can it be changed to php_oci8.dll?

 

Unable to load /usr/local/PHP/extensions\php_oci8.dll - The specified module could not be found.

Why does the reverse slash appear? Why can't Uniform server find the added dll file if it is in the right location?

 

 

 

Oracle Database.

I have never used Oracle or even set it up to run on UniServer however that said to enable PHP support for Oracle looks relatively easy.

 

I will assume you do not have a copy of php_oci8.dll (from PHP Version 5.2.3)

 

1) Download zip PHP Version 5.2.3 from

 

http://uk3.php.net/get/php-5.2.3-Win32.zip/from/a/mirror

 

2) Un-zip to any location (folder)

 

3) Look for the file php_oci8.dll located in folder:

 

*\php-5.2.3-Win32\ext (location step 2)

 

4) Copy this file to UniServer folder:

 

*\Uniform Server\udrive\usr\local\php\extensions

 

5) Open the file php.ini located in folder:

*\Uniform Server\udrive\usr\local\php

 

6) Locate the line:

;extension=php_oci8.dll

and change it to this:

extension=php_oci8.dll

 

7) Re-start the servers and check PHP info from apanel you will see an entry

 

OCI8 Support : enabled

Revision: (whatever)

 

I will leave the testing for you.

 

All the best

Ric :)

Share this post


Link to post
Share on other sites

Problem, I assumed you had installed the Oracle Database and have it up and running and you were only lacking PHP support.

 

This is not a complete solution. Implementing the suggested changes onlt results in the following errors: OCI.dll was not found.

 

Do you have Oracle Database installed and running? I think php_oci8.dll looks in the Windows path for OCI.dll

 

I do admit I am treading on thin ice because I have used neither.

 

All the best

Ric :)

Share this post


Link to post
Share on other sites

Update: The comment on errors is premature. I forgot to update the extensions list to enable the php_oci8.dll. I do get the same error when starting the server. Do I really need Oracle installed on the PC?

I am using UniformServer version 3.5 now. When using 3.3 I got those errors when starting the server. Now I don't get those errors but I get errors when accessing the page. The first error is "Call to undefined function oci_connect()".

I am not running OCI on the same PC as the UniformServer. Oracle db is located on a remote system. My php accesses this remote server. Since I am new to using Oracle I am having trouble understanding the components that need to be in place on my UniformServer to access the remote Oracle db. The php is known to work. I am just trying to move it to my UniformServer for testing new php.

1.) How can I verify that php_oci8.dll is working?

2.) With the dll, are the function calls supposed to be automatically available? The functions are called within the original php but I do not see any functions defined in the original code.

 

 

Problem, I assumed you had installed the Oracle Database and have it up and running and you were only lacking PHP support.

Do you have Oracle Database installed and running? I think php_oci8.dll looks in the Windows path for OCI.dll

 

I do admit I am treading on thin ice because I have used neither.

 

All the best

Ric :)

Share this post


Link to post
Share on other sites

OK, found this piece on oracle.com

http://www.oracle.com/technology/software/...cs/winsoft.html

Using the basic lite package I am no loner getting errors. I am now getting warnings related to connecting to the db. I'll post again when I make more progress.

 

Update: The comment on errors is premature. I forgot to update the extensions list to enable the php_oci8.dll. I do get the same error when starting the server. Do I really need Oracle installed on the PC?

I am using UniformServer version 3.5 now. When using 3.3 I got those errors when starting the server. Now I don't get those errors but I get errors when accessing the page. The first error is "Call to undefined function oci_connect()".

I am not running OCI on the same PC as the UniformServer. Oracle db is located on a remote system. My php accesses this remote server. Since I am new to using Oracle I am having trouble understanding the components that need to be in place on my UniformServer to access the remote Oracle db. The php is known to work. I am just trying to move it to my UniformServer for testing new php.

1.) How can I verify that php_oci8.dll is working?

2.) With the dll, are the function calls supposed to be automatically available? The functions are called within the original php but I do not see any functions defined in the original code.

Share this post


Link to post
Share on other sites

Like I said I am out of my dept on this one. I found this article http://www.orafaq.com/faqphp.htm that indicates you need two extensions:

 

extension = php_oci8.dll

extension = php_oracle.dll

 

Take a look and see if it helps in anyway.

 

All the best

Ric :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...