Java Mailing List Archive

http://www.dba.5341.com/

Home » Home (12/2007) » suse oracle »

Re: [suse-oracle] connecting webserver to oracle database server10g

Trusha

2007-03-30

Replies:

Hi, Thanks for your help.

I have donwloaded and install Instant Client from oracle. It has created /usr/lib/oracle/10.2.0.3 directory. I have copied both zip files in this directory and unzip it. it has created instantclient_10_2 in /usr/lib/oracle/10.2.0.3 directory. While creating a softlink using libclntsh.so -> libclntsh.so.10.1, it says that bash: libclntsh.so: command not found

I have install apache2 and apache2-devel with required libapr1-devel and libapr-util1-devel). Then I have install php. it is installed in /etc/php5. While using configuration in as shown in FIG A, it says that

bash: ./configure: No such file or command.

Can you please help me in resolving this? FIG A says about LOCATION-OF_UNZIPPED_ORACLE_FILES..Does it mean /usr/lib/oracle/10.2.0.3/instantclient_10_2 ??????

For step5 and above, where to enter make??? where to add LD_LIBRARY_PATH? WHere to enter make install? from where php.ini file i copy to apache directory???? where do I create tnsnames.ora? Apache is installed in /etc/apache2 direcotry.

I am not much familier with SuSE Linux, so please give me detailed steps for this.

Regards
Trusha

Uwe Schaefer <uwe.schaefer@(protected):

1. Download the Instant Client from Oracle
2. Be sure to get the basic and the sdk package for Linux (the basic in
RPM format to install the runtime environment and both the basic and sdk
in zip format to be used while compiling)
3. Install the RPM package (rpm -i)
4. Unzip both zips into the same directory
5. cd into the newly created directory (instantclient_10_x) and create a
softlink: libclntsh.so -> libclntsh.so.10.1

Apache/PHP:

1. Install apache2, do not install any PHP packages!
2. Install apache2-devel to get apxs2 (also required: libapr1-devel and
libapr-utils-devel)
3. Download the PHP source code and unzip it
4. Use configure as shown in FIG A
5. Enter make
6. Add the lib-directory generated by the RPM installed before (e.g
/usr/lib/oracle/10.2.0.3/client/lib) to the LD_LIBRARY_PATH
7. Enter make install
8. Copy the php.ini-recommended file to your apache config directory
(e.g. /etc/apache2)
9. Create the tnsnames.ora
10. cd into your apache config directory
11. (for apache 2) create a new file called php5.conf and copy the
content of FIG D into it
12. Be sure to include this conf in your vhost (e.g. Include
/etc/apache2/conf.d/php5.conf)
13. Edit the files containing module information (on SuSE 10.1:
/etc/sysconfig/apache2) and add the libphp5.so to the list of modules.
14. Start apache with the script from FIG C
15. Create a PHP page, only containing , save it in
your DocumentRoot and call it via a web browser. It should now display
an OCI8 information section.
16. You can now use the code from FIG E to test your Oracle database
connection


FIG A:
./configure
 --with-oci8=instantclient,
 --prefix=/usr/local
 --with-apxs2=/usr/sbin/apxs2
 --enable-sigchild
 --with-config-file-path=/etc/apache2

FIG C:
LD_LIBRARY_PATH=
:${LD_LIBRARY_PATH}
TNS_ADMIN=

export LD_LIBRARY_PATH TNS_ADMIN
echo Starting Apache apache2ctl start

FIG D:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps

FIG E:
    $c = OCILogon('', '
',
'');
    if($c != null){
          echo "YAY!";
    } else{
          echo "DOH!";
    }

$query = '';

$stid = OCIParse($c, $query); OCIExecute($stid, OCI_DEFAULT); while
($succ = OCIFetchInto($stid, $row)) { foreach ($row as $item) { echo
$item." "; } echo "
n"; }

OCILogoff($c); ?>


Trusha wrote:
> Dear All,
>  
>  I have a web server running on SuSE Linux ES 10 with Apache(2.2.0) and Php(5.1.2) installed. I have another server on SuSE Linux ES 9 on which Oracle Database 10g R2 in installed. I want to connect my webserver to oracle server. I have following the help available on oracle site but didn't succeed. I have download and install instant client. Can anyone in this group give me step by step help for the connectivity?
>  
>  Regards
>  Trusha
>
>    
> ---------------------------------
> Here?s a new way to find what you're looking for - Yahoo! Answers


--
To unsubscribe, email: suse-oracle-unsubscribe@(protected)
For additional commands, email: suse-oracle-help@(protected)
Please see http://www.suse.com/oracle/ before posting






       
---------------------------------
Here?s a new way to find what you're looking for - Yahoo! Answers
©2008 dba.5341.com - Jax Systems, LLC, U.S.A.