Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cannot Connect to Oracle 9i DB Server

452573Nov 7 2006 — edited Nov 6 2013
Hi,

My problem is, I cannot connect to Oracle 9i DB Server. I tried to run the php_info() and it displays: <br><br>

OCI8 Support enabled <br>
Version 1.2.2 <br>
Revision $Revision: 1.322 $ <br>
Active Persistent Connections 0 <br>
Active Connections 0 <br>
Temporary Lob support enabled <br>
Collections support enabled <br><br>

Directive Local Value Master Value <br>
oci8.default_prefetch 10 10 <br>
oci8.max_persistent -1 -1 <br>
oci8.old_oci_close_semantics 0 0 <br>
oci8.persistent_timeout -1 -1 <br>
oci8.ping_interval 60 60 <br>
oci8.privileged_connect Off Off <br>
oci8.statement_cache_size 20 20 <br><br>

I've got this from error.log in apache server. <br><br>

PHP Warning: ocilogon() [function.ocilogon]: <br>OCIEnvNlsCreate() failed. There is something wrong with your system - please <br>check that PATH includes the directory with Oracle Instant Client libraries in <br>C:\\EID_Web\\Exercises\\connect_to_oracle.php on line 14<br><br>

PHP Warning: ociparse() expects parameter 1 to be resource, boolean given in <br>C:\\Web\\connect_to_oracle.php on line 15<br><br>

PHP Warning: ociexecute() expects parameter 1 to be resource, null given in <br>C:\\Web\\connect_to_oracle.php on line 16<br><br>

PHP Warning: ocifetch() expects parameter 1 to be resource, null given in <br>C:\\Web\\connect_to_oracle.php on line 22<br><br>

PHP Warning: ocifreestatement() expects parameter 1 to be resource, null given in <br>C:\\Web\\connect_to_oracle.php on line 32<br><br>

PHP Warning: ocilogoff() expects parameter 1 to be resource, boolean given in <br>C:\\Web\\connect_to_oracle.php on line 33<br><br>

By the way, I'm using apache server version 2.2.3 and PHP/5.2.0RC6-dev running on <br>windows 2000 as our web server. We have a remote Oracle9i DB Server.<br><br>
Thanks in advance for the help.

Comments

NickR2600-Oracle

Sounds like you might be interested in Java Regular Expressions (regex) and pattern matching.  I've found regular expressions useful for formatting and searching Strings and numbers. There is a tutorial from Oracle (https://docs.oracle.com/javase/tutorial/essential/regex/ ).  I've also had luck googling for regular expression examples, since there's so many tricks, options, characters to keep track of.

mNem
Answer

I am using something like the one below. I don't know if that is going to help in

I am interested in tidying up the output to do the following:

  1. Strings and value in two separate columns (???)

 

public void printDetails() {

      System.out.println(String.format("Account Owner: %s", accountOwner));

      System.out.println(String.format("Account Type: %s", accountType));

      DecimalFormat df = new DecimalFormat("$ #,##0.00");

      String formattedBal = df.format(balance);

      System.out.println(String.format("Balance for customer [%s]:  %s", accountOwner, formattedBal));

}

Marked as Answer by OTG-467455 · Sep 27 2020
1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 4 2013
Added on Nov 7 2006
7 comments
22,019 views