Access Oracle815 on Windosws Server with PHP4
System environment:
1. Operating system: Windows Server
2. Database: Oracle 8i R2 (8.1.6) for NT Enterprise Edition
3. Installation path: d:oracle
Installation configuration PHP4:
The first step is to untie the Php-4.0.3-win32.zip compression pack and put it under c:php.
The second step, the c:php below the php.ini-optimized file copied to the C:winnt directory, and renamed to PHP.ini.
To modify the php.ini file:
Extension_dir = c:php
Extension=php_oci8.dll remove the front ";" No.
Extension=php_oracle.dll remove the front ";" No.
[Browscap] Browscap = C:phpbrowscapbrowscap.ini Remove the ";" in front of the BROWSCAP item No.
The third step is to copy the C:phpphp4ts.dll into the C:winntsystem32 directory.
Fourth step, start the IIS hypervisor.
Start-Settings-control Panel-Administrative Tools-internet Service Manager on the default Web site, click the right mouse button, select Properties,
The system pops up the default Web site Properties window:
Application name Input C:phpphp.exe%s%s Click Configure:
Click Add:
Fifth, click the "ISAPI Filters" tab on the "Default Web Site Properties" window, tap the "Add" button,
In the Filter Properties window that pops up, enter PHP in the filter name
Enter "C:phpsapiphp4isapi.dll" in the executable file to determine.
Sixth step, regedit, start Registry Editor to find:
Hkey_local_machinesystemcurrentcontrolsetservicesw3svcparametersscript Map.
Create a new string: Enter a name. php
Seventh step, go back to the Command Line window and enter the "net stop IISAdmin" command to terminate the IIS service.
The system will ask you if you want to stop the related services, answer yes.
Eighth step, enter the "net start w3svc" command to restart the IIS service.
Nineth, the c:phpextensions under the Php_oci8.dll, php_oracle.dll two files copied to c:php
1. Write the first code to connect to Oracle test.php
$handle = Ora_plogon ("test@ora815", "GDJ") or die; /* Create a handle to connect to Oracle */
$cursor = Ora_open ($handle); /* Open it and assign to a cursor */
Ora_commitoff ($handle);
$query = "SELECT * from"; /* Define a query */
Ora_parse ($cursor, $query) or die; /* Assign this query to the cursor */
Ora_exec ($cursor); /* Run the cursor, or run the query */
echo "
while (Ora_fetch ($cursor)) {/ * will hold query results in $cursor echo */
echo "
n ";
Ora_close ($cursor);
?>
http://www.bkjia.com/PHPjc/315686.html www.bkjia.com true http://www.bkjia.com/PHPjc/315686.html techarticle Access Oracle815 system environment with PHP4 on WINDOSWS server: 1, operating system: Windows 2, Database: Oracle 8i R2 (8.1.6) for NT Enterprise Edition 3, installation path : D: ...