PHP over ORACLE DATABASE

i'm only new to ORACLE database How can I integrate the oracle database into my PHP Program??
Who one can help... i'm very thank s,,,

How can I integrate the oracle database into my
PHP Program?? You can not integrate Oracle DB into PHP program.
But you can develop PHP program that use for data source Oracle DB.
About this see links already posted.
Cheers!

Similar Messages

  • Can anyone help me with a user login script on php for Oracle database?

    I have a script which somehow is not working well. Can anyone give a good script (for Oracle database) for user login and validation and change password? I will be grateful
    JJZ

    http://www.oracle.com/technology/pub/articles/deployphp/seliverstov_deployphp.html
    http://www.oracle.com/technology/tech/php/htdocs/php-oracle-tutorial.html

  • Error connecting via PHP to Oracle Database 10g XE in Arch Linux with XAMPP

    I get this error whenever I try to connect through PHP to my locally hosted Oracle Database 10g Express Edition
    Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries in <filename>.php on line 10
    What can I do?

    Not sure what to offer for XAMP with php, perhaps it needs a configure pointing OCI8 to your ORACLE_HOME, as well as setting the oracle environment and PATH adjustment in the Apache start script.
    Somewhere under /etc there should be an init.d or perhaps rc.d directory with maybe an apache2 script that gets called at system boot or run level change. It will take editing that shell script and adding something like:
      export ORACLE_HOME=/usr/....
      export PATH=$ORACLE_HOME/bin:$PATH
      export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATHAnd restarting apache ... $ [sudo] {RC path}/apache2 restart or $ ...apache2 stop followed by an $ ...apache2 start all depending on how the boot/inits are setup on the box.
    And in your $ORACLE_HOME/network/admin/tnsnames.ora adding a tnsalias won't hurt (as long as the whitespace as well as matching parenthesis are all in order)
    myxedb =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = myhost.mycompany.com)(PORT = 1521))
        (CONNECT_DATA =
          (SID = XE)
      )

  • Peoplesoft database vs oracle database

    hi, can someone please help me in pointing out the difference or any similarity between peoplesoft database and oracle database? i am naive so please explain it in simplest words, thanks

    It means that you should have only one instance of peoplesoft application installed on one oracle database.
    e.g you want to setup a development enviornment - so you need to first install oracle database and then install peoplesoft on it. When you will install peoplesoft over oracle database, it will load the oracle database with peoplesoft related peopletools tables which will help in building peolesoft application.
    Now if you need a test enviornmnet, then create another instance of oracle database and let name it UTL and install peoplesoft application on it.
    These two will be 2 differenct peoplesoft instances - Development & Testing.
    Hope this clarifies your question.

  • Not able to connect remote oracle database over VPN

    I can not connect remote oracle database over VPN. tnsping is ok and it shows the server information of remote database. i can also telnet the 1521 port of remote database server. I can connect the same server when it is located in the same LAN. Please help me out this is very urgent.

    6b6c669e-6baa-45c4-a6dc-444aef2d5e7a wrote:
    I can not connect remote oracle database over VPN. tnsping is ok and it shows the server information of remote database. i can also telnet the 1521 port of remote database server. I can connect the same server when it is located in the same LAN. Please help me out this is very urgent.
    First, this is a forum of volunteers.  There is no "urgent" here.
    "Urgent" means one of two things -
    1) people are dying, or
    2) you have a customer-facing, revenue-producing production system that is down.
    (And to get some perspective on the second case, keep the first in mind.)
    For the first, you call whatever civil emergency service seems appropriate.
    For the second, you open an SR with Oracle - which requires a paid-up support contract. For *them* to consider your problem "urgent", you will need to demonstrate that your problem falls under item #2. I seriously doubt your problem fits that criteria.
    You don't have a support contract?  Now you know the exact dollar figure that your company places on the data.
    That said, you need to understand a few things about your specific problem,
    First, port 1521 is only used by the listener to accept a connection request.  Once it gets that request (and finds that it is for a service (sid) that it knows about, it will fork a server process and tell the requesting client that it can communicate with that server process over some other port .. a randomly chosen port number in the "high" range.  It could be your vpn is blocking that other port, whereas your internal firewall is not.
    But this is just an educated guess since I cannot find "can not connect remote oracle database over VPN" in any error message manual. If you had mentioned the VPN along with an actual oracle error message we could be much more precise in our diagnoses and recommendations.
    ---- edit 22 Sep
    It occurred to me that I just assumed you were using the same client machine in both cases ... a laptop that you use both at work (local network) and home (vpn).  If that assumption is false, there are probably problems with your tns setup on the home (vpn) machine.
    But again, it would be much easier to help if you gave us an actual error message.

  • Oracle Database 10.2.0.1 + Apache 2.0.59 + PHP 5.2.0

    Hi all.
    Where can i find the changePerm.sh script for Oracle Database 10.2.0.1?
    I get the error:
    Warning: ocilogon() [function.ocilogon]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME is set and points to the right directory in /usr/local/apache/htdocs/oci8test.php on line 3
    Help me, please!
    Giovanni D'Ascola

    in Apache dir write short file: something.php
    <? phpinfo() ?>
    and access it via browser to see if there is oci defined.
    BTW. when you start apache you should se oracle (oci) variables to get access :-)

  • Connect to oracle database with php script

    Hello!
    How can I connect to an Oracle database with a PHP script? I read about it at www.php.net:
    "Oracle 8 functions; These functions allow you to access Oracle8 and Oracle7 databases. It uses the Oracle8 Call-Interface (OCI8). You will need the Oracle8 client libraries to use this extension."
    Where can I get these libraries from?
    Who knows more about the issue?
    Thanks a lot for your help!
    Martin
    null

    Hello
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by mheibel([email protected]):
    Hello!
    How can I connect to an Oracle database with a PHP script? I read about it at www.php.net:
    "Oracle 8 functions; These functions allow you to access Oracle8 and Oracle7 databases. It uses the Oracle8 Call-Interface (OCI8). You will need the Oracle8 client libraries to use this extension."
    Where can I get these libraries from?
    Who knows more about the issue?
    Thanks a lot for your help!
    Martin<HR></BLOCKQUOTE>
    Install and put working a sqlnet working client (install the Oracle Client option of the Oracle Database CD ROM). Than compile php with the --oci option. Than try the samples in php.net (oci function in the help).
    These are the steps... Put everything working is a little more complicated...
    FS
    null

  • Problem querying an Oracle Database using PHP

    Hi there, im rather new to Oracle so pardon my ignorance if this is completely obvious but I am creating a web form that queries an oracle database, firstly is a user form which looks like this.
    <br><br>
    Search for Investments<br>
    <form action="query.php" method="POST"><br>
    <input type = "text" name = "invest"><br>
    <input type="submit" value="Search" name="submit" /><br>
    </form><br>
    -----------------------<br><br>
    and the php script which looks like this<br><br>
    -----------------------<br><br>
    <?php<br><
    print "<HTML><PRE>";<br><br>
    require_once('connect.php');<br>
    select_data($conn);<br><br>
    $invest = $_POST['invest'];<br>
    echo "Returning results related to $invest";<br><br>
    function select_data($conn)<br>
    { $stmt = ociparse($conn,"select * from investmentbase where INVTYPE='$invest'");<br>
    ociexecute($stmt,OCI_DEFAULT);<br><br>
    echo "<table border = 1 class=results>";<br><br>
    echo "<tr>";<br>
    echo "<td>Reference Number</td>";<br>
    echo "<td>User ID</td>";<br>
    echo "<td>Investment Type</td>";<br>
    echo "<td>Investment Description</td>";<br>
    echo "<td>Amount Required</td>";<br>
    echo "<td>Due Date<td>";<br>
    echo "</tr>";<br><br>
    while (ocifetch($stmt)){<br>
    echo "<tr>";<br>
    echo "<td>";<br>
    echo ociresult($stmt,"INVREF")." ";<br>
    echo "</td>";<br>
    echo "<td>";<br>
    echo ociresult($stmt,"USERID")." ";<br>
    echo "</td>";<br>
    echo "<td>";<br>
    echo ociresult($stmt,"INVTYPE")." ";<br>
    echo "</td>";<br>
    echo "<td>";<br>
    echo ociresult($stmt,"INVDESCRIPTION")." ";<br>
    echo "</td>";<br>
    echo "<td>";<br>
    echo ociresult($stmt,"AMOUNTREQUIRED")." ";<br>
    echo "</td>";<br>
    echo "<td>";<br>
    echo ociresult($stmt,"REQUIREDATE");<br>
    echo "</td>";<br>
    echo "</tr>";<br><br>
    }<br>
    echo "</table>";<br>
    }<br><br>
    ocilogoff($conn);<br>
    print "</PRE></HTML>";<br>
    ?> <br><br>
    When i search for a value that is in the database no results are returned, however the form is definitely posting the variable as the echo statement on the PHP script displays it. Any ideas would be gratefully appreciated
    Many Thanks
    Paul

    Do you need to set $invest before calling do_select() and pass it as a
    parameter? Also, watch out for SQL Injection security risks. Try
    using a bind variable.
    $invest = $_POST['invest'];
    echo "Returning results related to $invest";
    select_data($conn, $invest);
    function select_data($conn, $invest)
      $stmt = ociparse($conn,"select * from investmentbase where INVTYPE=:ibv");
      ocibindbyname($stmt, ':ibv', $invest);
      ociexecute($stmt,OCI_DEFAULT);
      . . .Although the PHP 4 naming style for oci8 functions can be used with
    PHP 5, I know there is a possibility you are using the PHP 4 OCI8
    extension. If you are, then upgrade at least OCI8. There are some
    notes on this in
    Re: frustrations with oci_fetch_array()
    -- cj

  • Insert data into oracle database using a PHP form

    I'm trying to enter data into my oracle database table using a php form. When I click submit no data is added. Could someone help me please. I'm new to php/oracle thing.
    NOTE: I don't have any problem connecting to the database using php.
    Here is the code I'm using:
    <?php
    // just print form asking for name if none was entered
    if( !isset($query)) {   
    echo "<form action=\"$uri\" method=post>\n";
    echo "<p>Enter Name: ";
    echo "<input type=text size=100 maxlength=200 name=data value=\"$data\">\n";
    echo "<br><input type=submit name=submit value=Submit>\n";
    echo "</form>\n";
    exit;
    // insert client's name
    $query = "INSERT INTO client (name) VALUES ($data)";
    // connect to Oracle
    $username = "xxxx";
    $paswd = "yyyyyy";
    $dbstring = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)".
    "(HOST=patriot.gmu.edu)(PORT=1521))".
    "(CONNECT_DATA=(SID=COSC)))";
    $db_conn = ocilogon($username, $paswd, $dbstring);
    $stmt = OCIParse($db_conn, $query);
    OCIExecute($stmt, OCI_DEFAULT);
    OCIFreeStatement($stmt);
    OCILogoff($db_conn);
    ?>
    Thanks for your help. I will also appreciate a better was to do it.
    Tony

    resumption and jer,
    Sorry I cannot format the code for easy reading!
    The page is submitting to itself. See action = \"$uri\". I used the same logic to enter SELECT querries into the database. It pulls and displays data back on the webpage. The code I used for this is below. Compare it with the one above for inserting data into the table.
    <?php
    // connect to oracle
    $username = "xxxxx";
         $paswd = "yyyyy";
         $dbstring = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)".
              "(HOST=patriot.gmu.edu)(PORT=1521))".
              "(CONNECT_DATA=(SID=COSC)))";
         $db_conn = ocilogon($username, $paswd, $dbstring);
    // username and password will be unset if they weren't passed,
    // or if they were wrong
    if( !isset($query)) {
    // just print form asking for account details
    echo "<form action=\"$uri\" method=post>\n";
    echo "<p>Enter Query: ";
    echo "<input type=text size=100 maxlength=200 name=query value=\"$query\">\n";
    echo "<br><input type=submit name=submit value=Submit>\n";
    echo "</form>\n";
    exit;
    // remove unwanted slashes from the query
    $query = stripslashes($query);
    // run the query
    $stmt = OCIParse($db_conn, $query);
    OCIExecute($stmt, OCI_DEFAULT);
    // Open the HTML table.
    print '<table border="1" cellspacing="0" cellpadding="3">';
    // Read fetched headers.
    print '<tr>';
    for ($i = 1;$i <= ocinumcols($stmt);$i++)
    print '<td class="e">'.ocicolumnname($stmt,$i).'</td>';
    print '</tr>';
    // Read fetched data.
    while (ocifetch($stmt))
    // Print open and close HTML row tags and columns data.
    print '<tr>';
    for ($i = 1;$i <= ocinumcols($stmt);$i++)
    print '<td class="v">'.ociresult($stmt,$i).'</td>';
    print '</tr>';
    // Close the HTML table.
    print '</table>';
    OCIFreeStatement($stmt);
    OCILogoff($db_conn);
    ?>

  • Bea weblogic 6.1 does not oracle Database fail over

    Hi We had Concurrency Strategy:excusive . Now we change that to Database for performace
    reasons. Since we change that now when we do oracle database fail over weblogic
    6.1 does not detect database fail over and it need restart.
    how we can resolve this ??

    mt wrote:
    Hi We had Concurrency Strategy:excusive . Now we change that to Database for performace
    reasons. Since we change that now when we do oracle database fail over weblogic
    6.1 does not detect database fail over and it need restart.
    how we can resolve this ??Are your pools set to test connections at reserve time?
    Joe

  • Using php to connect to Oracle Database 11g Release 2 Enterprise Edition

    Greetings everyone!
    Please i dont know how to connect to Oracle Database 11g Release 2 Enterprise Edition with php even though i connected with php successfully with Oracle Database 11g Express Edition with the php code below. can someone help please...
    define('ORA_CON_UN', 'hr'); // User name
    define('ORA_CON_PW', 'Adlibs14$'); // Password
    define('ORA_CON_DB', '//localhost/XE'); // Connection identifier
    // use constants defined in anyco_cn.inc
    $conn = oci_pconnect(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB);
    if (!$conn) {
    db_error(null, __FILE__, __LINE__);
    Edited by: user11273096 on Jul 14, 2011 3:41 PM

    Note that this forum is for XE Beta, not EE.
    Can you connect from some other client tool, such as sqlplus?
    There's a {forum:id=178} forum that may be more suitable, if basic connectivity outside php works (i.e. issue is only php specific).

  • Using php to connect to Oracle Database 11g Release 2 Enterprise Edition EE

    Greetings everyone!
    Please i dont know how to connect to Oracle Database 11g Release 2 Enterprise Edition with php even though i connected with php successfully with Oracle Database 11g Express Edition with the php code below. can someone help please...Note im referring to oracle EE not XE.
    define('ORA_CON_UN', 'hr'); // User name
    define('ORA_CON_PW', 'Adlibs14$'); // Password
    define('ORA_CON_DB', '//localhost/EE'); // Connection identifier
    // use constants defined in anyco_cn.inc
    $conn = oci_pconnect(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB);
    if (!$conn) {
    db_error(null, __FILE__, __LINE__);
    Edited by: user11273096 on Jul 15, 2011 12:03 AM

    Find the hostname and service name of the database and use those values in the ORA_CON_DB constant.
    Use 'lsnrctl status' on the database host to find the service name.
    If you use a "tns" alias, you may need to create a tnsnames.ora file where PHP can access it.
    Set the environment variable TNS_ADMIN (on Linux) to the directory containing the file.
    See the section "Oracle Database Name Connection Identifiers" p 102 of the free book
    http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html

  • Saving an Image to an Oracle Database over the Internet

    I would like to know how to transfer an image over the Internet and save that image to an Oracle Database. That is I am trying to make it so that a user can connect to the Internet and select an image file form their PC in TIFF, JPEG, or some other format. Next, I would like to save this image to an Oracle 7.3.4 Database in a LongRaw data type. This image will need to be save into a certain record in a table that I created. In the next few months we will be upgrading to Oracle 8 that uses Blob data type. Any one who knows how this can be done, please let me know.

    Yes, that's right. Here is the pertinent code:
    In the flax app:
    private function captureImg(imgEnc:IImageEncoder):void { 
    var ohSnap:ImageSnapshot;ohSnap = ImageSnapshot.captureImage(img, 0, imgEnc);
    textArea.text = ImageSnapshot.encodeImageAsBase64(ohSnap);
    InsertImage(textArea.text);
    In the HTTP service AS module:
    private  
    function InsertImage(sImageCoded:String):void { var sQry:String;sQry =  
    "INSERT INTO image (lImageId, blbBitMap, txtImage, lRecipeId) " sQry +=
    "VALUES(0, '" +sImageCoded +"', 'text', 23)"  
    //Alert.show(sQry);mysqlQuery(sQry,
    "InsertImage");}
    As mentioned previously, an HTTPrequest error is generated although I can enter
    the string into the blob manually in MySQL.
    Scott

  • Placing oracle Database over web

    Dear all,
    I am using Oracle 9i, I have created my database on my system ,now I want to publish my website .and also want to provide my users to access it over net.
    how to tranfer my whole database to server.since oracle cann't copied form one place to another.
    what i have to do whether I have to design same database over server and inserting all data again . I have about 3 lakhs of data .Please provide me the solution for that.
    Thanking all.

    how to tranfer my whole database to server.You need first to ensure that your provider support Oracle database.
    since oracle cann't copied form one place to another.Of course, that work, under some condition, but that work : exp/imp, transport tablespace, clone (copy files).
    Nicolas.

  • ORAMON: Oracle Database Monitoring tool in PHP

    ORAMON is a free Oracle database monitoring tool written in PHP. It can help you in managing critical database administration task easily. It also offers SQL Editor where you can write your own customize queries.
    What you can monitor from Oramon?
    * Database/Listener status
    * Notification on database status
    * Hit ratios
    * User information
    * Rollback segments
    * Tablespaces
    and more..
    Please visit oramon website http://www.oramon.org for more detail.
    For download go to http://www.oramon.org/download.php

    Can you please list this project in open source project list?

Maybe you are looking for

  • Anything after 3.6.3 doesn't open window, but process appears in task manager.

    After trying to upgrade from 3.6.3 Firefox never opens, it will still show that it is being used in processes under the task manager, but no window ever comes up. Version 3.6.3 works perfectly but any version after has the same effect. I am running W

  • Legacy Smart Guides in CS5?

    Wondering if there is any talk of being able to opt for "legacy" Smart Guides in Illustrator CS5?  I would upgrade for that feature alone.  The Smart Guides in CS4 are infuriating.  I know this is an old gripe.  And, yes, I'm aware of tweaking prefer

  • Sql server 2000 type4 driver for jdbc connection error

    hello, I am trying to connect m ms sql server 2000 database server with type 4 driver.But I am getting an connection error like *"Error Establishing Socket"* .Can any one please help me out?

  • Some objects refuse to scale in size when moved

    Say I have three circles on a slide. I want to animate a move of each circle to another section of the slide and I want the circles to either shrink or grow as they move. I can do this with two of the circles with no problem, but the last one will on

  • Boot system flash: does not appear on 2960 running config

    Dear friends, On the 2960, i have two .bin images and i am pointing to the latest one. However, the boot system flash: command along with the new image does not appear in the running config but it appears in the show boot command. t3a.sidradc.dmz.01#