From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653755322526.tru64-unix-managers.marc@archive.invalid> From: "MacDonell, Dennis" Date: Mon, 22 Apr 2002 05:57:41 +0000 To: tru64-unix-managers Subject: connecting to an Oracle database from a php script via a web serv er. X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653755322526 Hi, I have setup php+mysql+oracle+apache on a Tru64 v5.1A installation with oracle 8.1.7. The following sources were used - autoconf-2.52 flex-2.5.4 php-4.1.2 automake-1.5 make-3.79.1 apache_1.3.23 bison-1.34 mysql-3.23.49.OSF1 I can run phpinfo(), and I have run ldd -r on httpd and checked that it has a couple of oci8 library entries, but I can't get the following script to work (adapted from the online manual) *********************** ********************** What I get is the following ********************** Warning: _oci_open_server: ORA-12154: TNS:could not resolve service name in /www/Oracle/oracleoci.php on line 24 Warning: Supplied argument is not a valid OCI8-Connection resource in /www/Oracle/oracleoci.php on line 26 Warning: Supplied argument is not a valid OCI8-Statement resource in /www/Oracle/oracleoci.php on line 30 Warning: Supplied argument is not a valid OCI8-Statement resource in /www/Oracle/oracleoci.php on line 31 Warning: Supplied argument is not a valid OCI8-Statement resource in /www/Oracle/oracleoci.php on line 33 Warning: Supplied argument is not a valid OCI8-Statement resource in /www/Oracle/oracleoci.php on line 36 ***************** The line numbers may not align because I have deleted a few lines from what is shown of the script. I stopped the listener and created a file called /oracle_home/admin/tnsnames.ora which contained the following ***************** lando = (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=lando) (PORT=1521)) (CONNECT DATA= (SID=ARC))) ****************** and then restarted the listener, but alas that did not make any difference. I was wondering if a knowledgeable person could shed some light on what is missing. Dennis ###################################### Dennis Macdonell Systems Administrator National Mapping Division, Geoscience Australia mail: PO Box 2, Belconnen, ACT 2617 email: mcdonell@auslig.gov.au ph: 61 2 6201 4326 fax: 61 2 6201 4377 ######################################