• User Newbie

    web service

    ho installato apache 2.0.5 php 4.4.2 oracle 9i.
    come faccio a connettere php ad oracle?
    vi ringrazio anticipatamente!!
    questa sara' la prima di tantissime domande visto ch in ufficio mi hanno chiesto di realizzare un web service in php ed io non l'ho mai minimamente fatto ma sono testardo e voglio riuscirci certo con l' aiuto di qualcuno sara' sicuramente meno faticoso mercy'!:bho:


  • User Attivo

    @treesilence said:

    ho installato apache 2.0.5 php 4.4.2 oracle 9i.
    come faccio a connettere php ad oracle?
    vi ringrazio anticipatamente!!
    questa sara' la prima di tantissime domande visto ch in ufficio mi hanno chiesto di realizzare un web service in php ed io non l'ho mai minimamente fatto ma sono testardo e voglio riuscirci certo con l' aiuto di qualcuno sara' sicuramente meno faticoso mercy'!:bho:

    Using the OCI Extension Module -
    <?php
    if ($c=OCILogon("scott", "tiger", "orcl")) {
    echo "Successfully connected to Oracle.\n";
    OCILogoff($c);
    } else {
    $err = OCIError();
    echo "Oracle Connect Error " . $err[text];
    }
    ?>

    Using the ORA Extension Module -
    <?php
    if ($c=ora_logon("scott@orcl","tiger")) {
    echo "Successfully connected to Oracle.\n";
    ora_commitoff($c);
    ora_logoff($c);
    } else {
    echo "Oracle Connect Error " . ora_error();
    }
    ?>

    NOTE: You might want to set your Oracle environment from within PHP before connecting, look at this example:
    <?php
    PutEnv("ORACLE_SID=ORCL");
    PutEnv("ORACLE_HOME=/app/oracle/product/9.2.0");
    PutEnv("TNS_ADMIN=/var/opt/oracle");
    ...

    Please note that PHP will share/re-use connections if the same userid/password combination is used (more than once) on a particular "page" or httpd server session. One can use the OCINLogon() function to ensure one gets a new session. Use the OCIPLogon() function to make persistent connection

    Provenienza da [url=http://www.orafaq.com/faqphp.htm]Oracle FAQ: Oracle/ PHP FAQ


  • User Newbie

    :arrabbiato: Thanks for the aid Raul. I communicate you that I have resolved the problem thanks to your intuition.


  • User Newbie

    Seondo problema:
    quali toolkit esistono per sviluppare un web service con quella configurazione che ho postato??? amore e rispetto per chiunque mia sia di aiuto!!! considerando che parto da schemi xsd.


  • User Newbie

    ovviante free.
    Altova vuole soldi che io non ho!