Server Error:configure 9i with php
Respected
I want to configure oracle 9i version 9.2.0.1.0 with php on windows xp. First of all I tried with apache 2 but it was clashing with oracle's apache therefore I installed appserv 2.6.0 and given the port 81 for the "localhost:81". In this way I succeeded to run the php simple program "hello world" using "localhost:81/test/hello.php" but when I executed the connected program(check below) it gives *"The website encountered an error while retrieving http://localhost:81/test/test1.php. It may be down for maintenance or configured incorrectly".* HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
I have done following changes in php.ini and http.conf
1- kept php.ini in c:\windows
2- set the doc_root
3- extension_dir
4- session.save_path="c:\temp"
5- uncomment the line extension=php_oci8.dll
http.conf
1- Allowoverride None to All
2- DirectoryIndex element has been set with index.php
3- AddType command for php "AddType application/x-http-php .php" is set
4- LoadModule php6_module has been set with "LoadModule php6_module C:/AppServ\php\php6apache2_2.dll" Remeber appserv is using php6 and I could not find "php_oracle.dll" in ext folder of php6
connected Program
<?php
$conn=oci_connect('scott@orcl','tiger','//localhost:81/orcl');
if(!$conn){
$m=oci_error();
echo $m['message'],"\n";
exit;
}
else
{
print "connected to oracle";
}
oci_close($conn);
?>
*2nd program*
<?php
<?
if ($conn=Ora_Logon("scott@orcl","tiger")){
echo "<B>SUCCESS ! Connected to database <B>\n";
}
else
{
echo "<B>Failed<B>\n";
}
Ora_Logoff($conn);
phpinfo();
?>
please help me where I am wrong, I want to run php on the same machine where database resides.
Edited by: 885098 on Nov 2, 2011 12:03 PM