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. ...