I want to configure oracle 9i version 188.8.131.52.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
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
print "connected to oracle";
echo "<B>SUCCESS ! Connected to database <B>\n";
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
The old php_oracle.dll (the extension named 'oracle') was long obsoleted by the newer php_oci8.dll (the extension named 'OCI8'). I would not expect your program using ora_logon() to work anymore. A function mapping between the old & new extensions is in Appendix D of the free book The Underground PHP and Oracle Manual.
The Windows DLLs available from the PHP community build OCI8 using Oracle Instant Client 10g (or 11g for the php_oci8_11g.dll). You will need to have one of these new versions on your machine and make sure that PHP and the Database uses their appropriate version of the Oracle libraries without causing name clashes. This is easier said than done on Windows.
Finally, there is no PHP version 6 available or even planned. The PHP community is currently focusing on PHP 5.4, which is Beta.
You may find it easier to install Oracle XE 11.2 (http://www.oracle.com/technetwork/database/express-edition/downloads/index.html) and use PHP with those libraries. Or install and use Linux.
Thank u very much, please tell me should I use Apache separately with 11g R2 Express Edition or my approach using "AppServ" is correct ? 2ndly I read an article that there is no need any client software if u r using same machine for oracle database software and php
1. I've not looked at AppsServ. If it's the same as I googled, then it looks like an old version of PHP.
You might consider looking at Zend Server instead.
2. Yes you don't need Oracle client software if PHP & the Oracle DB are on the same machine. But if
your PHP OCI8 DLLs were built requiring a certain minimum version of Oracle libraries and your DB
is not equal or greater than that version, then you'll need to (a) get that minimum version of the Oracle
libraries or (b) recompile PHP yourself.
Thank u I just start according to your instructions. According to the discussion I am going to start 11g R2 express edition and with zend server or Apache, I hope so need of client software ll be omit. my direction is correct?
Edited by: 885098 on Nov 4, 2011 11:14 AM
Thank u very much Mr cj, done what I wanted and now I am enjoying with oracle database. I used apache httpd-2.2.21-win32-x86-no_ssl , php-5.2.17-Win32-VC6-x86 with oracle 11R2 express edition. your article is also helpful on http://www.oracle.com/technetwork/articles/technote-php-instant-084410.html to understand further.