Last updated 5 Mar 2005
| Apache 2 | apache_2.0.53-win32-x86-no_ssl.msi |
| PHP5 (to install Oracle extension) | php-5.0.4-Win32.zip |
#### Run as an Apache module LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php PHPIniDir "C:/php"Run as a CGI
#### Run as a CGI ScriptAlias /php/ "c:/php/" AddType application/x-httpd-php .php Action application/x-httpd-php "/php/php-cgi.exe" PHPIniDir "C:/php"
DirectoryIndex index.html index.html.var index.php
<? phpinfo(); ?>
; extension_dir = "./" extension_dir = "C:\php\ext" ;extension=php_oci8.dll extension=php_oci8.dllNote: Oracle must be installed before enabling this
<?php
$dbh = OCILogon( "scott", "tiger", "localhost:1521/orcl" );
if ($dbh == NULL) {
print "DB Connection Error!!";
} else {
$sql = "SELECT table_name FROM all_tables";
$stmt = OCIParse($dbh, $sql);
if (!$stmt) {
print "DB Search Error!!";
} else {
OCIExecute($stmt);
$rows = OCIFetchstatement($stmt, $results);
if ($rows > 0) {
for ($i = 0; $i < $rows; $i++) {
print $results["TABLE_NAME"][$i] . "<br>";
}
}
}
OCIFreeStatement($stmt);
OCILogoff($dbh);
}
?>
; mbstring configuration mbstring.language = Japanese mbstring.internal_encoding = EUC-JP mbstring.http_input = auto mbstring.http_output = SJIS mbstring.encoding_translation = On mbstring.detect_order = auto mbstring.substitute_character = none ; other configuration default_charset = "Shift_JIS" output_buffering = On output_handler=mb_output_handler
mbstring.language = Japanese mbstring.internal_encoding = EUC-JP mbstring.http_input = auto mbstring.http_output = EUC-JP mbstring.encoding_translation = On mbstring.detect_order = auto mbstring.substitute_character = none ; other configuration default_charset = "EUC-JP"