Advertisement

08.04.2006 at 07:21AM PDT, ID: 21943462
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.4

ORA-12154: and PHP OCI8

Asked by crawfordit in Oracle Database

Tags: , ,

ORA-12154: and PHP OCI8

History

I have a Centos box setup with PHP5 and oracle enabled in php config. I had everything working for basic queries from orcle and then a poweroutage happend and the machine got rebooted. Now I am at a loss as to what is going on.
#############################################
This is my test page and it was working like a charm before the reboot.
<?php
#testing for the oracle database fuctions
  $conn = oci_connect('******', '*******', 'PILOT');
  if (!$conn) {
   $e = oci_error();
   print htmlentities($e['message']);
   exit;
  }
  $query = 'select * from all_tables';
  $stid = oci_parse($conn, $query);
  if (!$stid) {
   $e = oci_error($conn);
   print htmlentities($e['message']);
   exit;
  }
  $r = oci_execute($stid, OCI_DEFAULT);
  if (!$r) {
   $e = oci_error($stid);
   echo htmlentities($e['message']);
   exit;
  }
  print '<table border="1">';
  while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS)) {
   print '<tr>';
       foreach ($row as $item) {
         print '<td>'.($item?htmlentities($item):'&nbsp;').'</td>';
       }
       print '</tr>';
  }
  print '</table>';
  oci_close($conn);
?>
###########################################
This would just return all_tables as you can see from the query.

Config's
path to the oracle installation
/usr/lib/oracle/10.2.0.2/client/lib/
path to the tnsnames.ora file
/usr/lib/oracle/10.2.0.2/client/lib/orafiles/tnsnames.ora


#####################################
rc.local
export ORACLE_HOME=/usr/lib/oracle/10.2.0.2/client
export ORACLE_SID=orcl
export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.2/client/lib
export TNS_ADMIN=/usr/lib/oracle/10.2.0.2/client/lib/orafiles
#####################################


#####################################
double check the paths
[root@cent]# echo $ORACLE_HOME
/usr/lib/oracle/10.2.0.2/client
[root@cent]# echo $ORACLE_SID
orcl
[root@cent]# echo $LD_LIBRARY_PATH
/usr/lib/oracle/10.2.0.2/client/lib
[root@cent]# echo $TNS_ADMIN
/usr/lib/oracle/10.2.0.2/client/lib/orafiles
######################################


tnsnames.ora file
################################################
# TNSNAMES.ORA Network Configuration File:
#

LAZYBOY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.5)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = LAZYBOY)
    )
  )
PILOT =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.5)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = PILOT)
    )
  )
PILOT2 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.5)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = PILOT2)
    )
  )
BOX =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.5)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = BOX)
    )
  )

########################################################

If you have anything that could help out on this that would be great.

Thanks in advanced for your time and input




Start Free Trial
[+][-]08.04.2006 at 01:45PM PDT, ID: 17253045

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.04.2006 at 01:45PM PDT, ID: 17253052

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.08.2006 at 05:45AM PDT, ID: 17270840

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.08.2006 at 02:31PM PDT, ID: 17274920

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Oracle Database
Tags: php, connect, oci8
Sign Up Now!
Solution Provided By: rbrooker
Participating Experts: 2
Solution Grade: A
 
 
[+][-]08.09.2006 at 07:27AM PDT, ID: 17279176

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43