On the Connection setting _php foundation of PHP4.0 and Oracle 8 under Windows

Source: Internet
Author: User

PHP under the Linux/unix to connect Oracle8 is very easy, but under the Windows platform is not easy, I after a long exploration to find a reliable way, do not dare to enjoy alone,
It is now published for the feast. The author uses the development environment: Windows 98 Second Edition PHP4.04PL1 Apache 1.3.14 window Edition Oracle 8.05 client PHP to install the test successfully after the CGI. Test with the following code
<?php
$conn = Ocilogon ("CINMSIII", "CINMSIII", "(DESCRIPTION = (address = (PROTOCOL = TCP) (HOST = 192.168.3.202) (PORT = 1521)) (CON Nect_data = (SID = unicom)));
$conn =ocilogon ("CINMSIII", "CINMSIII", "Cinms"); If the Oracle client is 8.1.6i, this can be done using the parameter as if ($conn!=false)
{
echo "OK";
Ocilogoff ($conn);
}
Else
echo "false";
?> about Connection parameter issues:
The connection string is set to the following:
(DESCRIPTION = (address = (PROTOCOL = TCP) (HOST = 192.168.3.202) (PORT = 1521)) (Connect_data = (SID = unicom)) PROTOCOL: To use the network protocol host: For the database server host name SID: After doing this for the database instance number, there is generally no problem. If your Oracle 8 client is 8.1.6i Enterprise Edition, you can set these parameters in the connection string with the Oracle8 Net Easy Config utility.
The set name of the connection string is passed in as a connection string. Presumably Oracle 7.x can also use this method, because there is no environment, no test, if you are interested can try. (Source: Viphot)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.