Windows PHP4.0 Connection Setup with Oracle 8 _php Tutorial

Source: Internet
Author: User
PHP in the Linux/unix to connect Oracle8 is very easy, but in the Windows platform is not easy, I have long been groping to find a reliable method, not alone,
It is now published to treat everyone.
I use the development environment:
Windows 98 Second Edition
Php4.04pl1
Apache 1.3.14 Window Edition
Oracle 8.05 Client
After the test was successfully installed in CGI mode, PHP was completed. Test with the following code
$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, it can be used, the parameters are illuminated
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: Network protocol for use
Host: the database server hostname
SID: the instance number for the database
This generally does not have any problems after this.

If your Oracle 8 client is a 8.1.6i Enterprise Edition, you can set these parameters in a connection string using the Oracle8 Net Easy Config utility.
The set connection string name is passed in as a connection string.
Presumably Oracle 7.x can also use this method, because there is no environment, not tested, if you are interested can try.

http://www.bkjia.com/PHPjc/532267.html www.bkjia.com true http://www.bkjia.com/PHPjc/532267.html techarticle PHP in the Linux/unix under the connection Oracle8 is very easy, but in the Windows platform is not easy, I after a long time to find a reliable method, dare not exclusive, is now released to treat everyone. ...

  • Related Article

    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.