Re: oracle functions ???
| From: | David Newcomb | Date: | Thu, 07 Sep 2000 10:15:30 +0000 |
| Subject: | Re: oracle functions ??? | ||
| References: | 1 2 3 4 5 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-2685@lists.php.net to get a copy of this message | ||
Make sure the $ORACLE_HOME and $ORACLE_SID are set in the
environment of the web server and the webserver user has read access
to the oracle tnsname.ora file.
The 3rd argument to the OCILogin is optional if the environment is set up
properly (ie env vars are set).
The 3rd argument is the database name. The login process will read the
tnsnames.ora to find out the name of the machine and the port number.
Find out the user that runs the web server
and:
su - nobody # where nobody = user web server runs under
cd $ORACLE_HOME/network/admin
vi tnsnames.ora
If you can't read it then make it so you can, my adding the webserver
user into the dba (oracle) group.
Let me know how it goes,
David.
----- Original Message -----
From: Paul <pluscher@studeo.com>
To: David Newcomb <davidn@vnvi.com>
Sent: Wednesday, September 06, 2000 9:54 PM
Subject: Re: [PHP] oracle functions ???
> This is my attempt:
>
> <?php
> $bgcolor = "green";
> $textcolor = "white";
>
> print "<HTML><PRE>";
> ?>
> <BODY <? Print "bgcolor='$bgcolor' text='$textcolor'";
> ?>>
> <?php
>
> $c1 = OCILogon("comph", "password",
> "dev.studeo.com:1521:ZIG");
> echo $bgcolor;
> echo $ORACLE_SID;
>
> print "</PRE></HTML>";
> ?>
>
> This is my result:
>
> Warning: _oci_open_server: Error while trying to retrieve text for
> error ORA-06401
> in /home/develop/www/htdocs/php_dev/oracle.php on line 10
>
> green
>
>
>
>
> Line 10 is the line with the ocilogon() statement. I am at a total
> loss as to what the meaning of this could be. What is the name of a
> database? The URL? The port? the SID?
> --
> _______________________________________________
> Paul Luscher
> Web Developer
> Studeo Interactive Direct
> Ph. 801.993.2219
>
> pluscher@studeo.com