Home » Open Source » Programming Interfaces » Connect Oracle with php
Connect Oracle with php [message #512896] Wed, 22 June 2011 13:53 Go to next message
Dikshit
Messages: 8
Registered: March 2011
Location: Ludhiana
Junior Member
I want to connect oracle through php please help

[MERGED by LF]

[Updated on: Wed, 22 June 2011 15:55] by Moderator

Report message to a moderator

Connect Oracle with php [message #512898 is a reply to message #512896] Wed, 22 June 2011 13:54 Go to previous messageGo to next message
Dikshit
Messages: 8
Registered: March 2011
Location: Ludhiana
Junior Member
Please help me i want to connect oracle with php but i failed to do so..Please help me and guide me step by step thanxx
Re: Connect Oracle with php [message #512906 is a reply to message #512898] Wed, 22 June 2011 14:27 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
If you don't post what you tried and show us what failed how can we help you to debug your code?

Also you can Google for "php oracle" and you will have hundred of sample code. I know it as I started with that a couple of years ago.

Regards
Michel

[Updated on: Wed, 22 June 2011 14:29]

Report message to a moderator

Re: Connect Oracle with php [message #513311 is a reply to message #512906] Sun, 26 June 2011 10:35 Go to previous messageGo to next message
Dikshit
Messages: 8
Registered: March 2011
Location: Ludhiana
Junior Member
Ok Michal..
I hv remove the comment of ocl dll extension and then try to open oracle with oci_connect function in php but error occured call to undefined function ocl_connect()..Please help
Re: Connect Oracle with php [message #513313 is a reply to message #513311] Sun, 26 June 2011 11:40 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Did you link/bind your application server with OCI extension?
Post phpinfo page.

Regads
Michel
Re: Connect Oracle with php [message #513448 is a reply to message #513313] Mon, 27 June 2011 10:04 Go to previous messageGo to next message
Dikshit
Messages: 8
Registered: March 2011
Location: Ludhiana
Junior Member
here is my php.ini file..PLZ HELP
Re: Connect Oracle with php [message #513452 is a reply to message #513448] Mon, 27 June 2011 10:12 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Depending on your environment, php.ini (which is not there) is not sufficient.
Post phpinfo page.
Create the php page with the following content and call it, then post the result:
<?php

phpinfo();

?>


Regards
Michel
Re: Connect Oracle with php [message #513456 is a reply to message #513313] Mon, 27 June 2011 10:27 Go to previous messageGo to next message
Dikshit
Messages: 8
Registered: March 2011
Location: Ludhiana
Junior Member
ok..here is my php info() file.
  • Attachment: info.txt
    (Size: 27.91KB, Downloaded 2911 times)
Re: Connect Oracle with php [message #513463 is a reply to message #513456] Mon, 27 June 2011 11:18 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
You have:
"--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared"
"--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared"
"--with-oci8-11g=D:\php-sdk\oracle\instantclient11\sdk,shared"

and:
PATH D:\oracle\product\10.2.0\db_1\bin

Fix the path with what you have on your server, choose only one oci8 option (given the PATH it seems the second one is the correct one but with the wrong path).

In addition, ORACLE_HOME should be set in Apache and PHP environment.

Regards
Michel
Re: Connect Oracle with php [message #513465 is a reply to message #513463] Mon, 27 June 2011 11:28 Go to previous messageGo to next message
Dikshit
Messages: 8
Registered: March 2011
Location: Ludhiana
Junior Member
ok Michel.. never mind of my stupid questions because i m new to php with oracle You told me to change path but how i change path.Explain me step by step?
Re: Connect Oracle with php [message #513466 is a reply to message #513465] Mon, 27 June 2011 11:43 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Sorry I am not Apache/PHP expert and I don't know how you configure them, I can only see your configuration is wrong.
Maybe you can post your configuration question on a Apache or PHP forum.

Regards
Michel
Re: Connect Oracle with php [message #513471 is a reply to message #513463] Mon, 27 June 2011 13:26 Go to previous messageGo to next message
Dikshit
Messages: 8
Registered: March 2011
Location: Ludhiana
Junior Member
michel , I hv been puzzled so guide me from stating
Re: Connect Oracle with php [message #513474 is a reply to message #513471] Mon, 27 June 2011 14:35 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
I can't, I can't tell you what I don't know.
If you had a problem to program with PHP on Oracle, I could help you but to configure Apache/PHP/Oracle I can't.

Regards
Michel
Previous Topic: Permission of Perl/Library
Next Topic: Cannot create JDBC Driver of class 'oracle.jdbc.driver.OracleDriver'
Goto Forum:
  


Current Time: Sat Nov 23 05:56:37 CST 2024