Call php from PL/SQL

Hello !
i want to call PHP from PL/SQL(procedure).
Is it possible .
If yes then how.
if no then is there any other way to do it.
Regards
null

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Michael Kleiser ([email protected]):
Look at this: http://www.oracle.com/oramag/code/tips2001/index.html?021201.html
It`s a java-function which calls a os-command.
I haven4t testet it.
In this forum http://www.dbasupport.com/forums/showthread.php?threadid=3703
someone asked the same question as you.
I hope this helps you.<HR></BLOCKQUOTE>
I've tried the tip above without success. Has anyone got it to work?
null

Similar Messages

  • Advantages and Disadvantages of calling java from PL/SQL

    Hi,
    I have one doubt. What are all the advantages and disadvantages of the calling java from PL/SQL?
    In actual scenario the java program will be in the Application server side. It will do the operation and it will store the result in Data base. But in this case (calling java from PL/SQL), we are loading the java program in the Data base and it is doing the operations.
    I have seen many posts are coming regarding loading jar files into the database. Actually the jar will deploy in to Application server. Is there any difference instead of keeping in the Application server side?
    Then I have read,
    advantages:
    -> java having lot API's. so PL/SQL can use that API's.
    -> if we can not do anything in PL/SQL. we can do it using this mtd(calling java from PL/SQL).
    My questions:
    -> could you explain what are all the things we can not do but we can do using "calling java from PL/SQL" method?
    -> is there any other advantages?
    Disadvantages:
    -> the performance is very slow in calling java from PL/SQL.
    My questions:
    -> Then why others are loading java files and jar files into database?
    -> is there any other disadvantages?
    Could you explain about this one? It will be more helpful to others also…
    Regards,
    kk

    Hi,
    You can read the free first chapter of my book @ http://www.amazon.com/gp/product/1555583296/ (see details then Excerpt)
    Kuassi http://db360.blogspot.com

  • Call rules from PL/SQL

    Hi,
    I have ruleset and it being called by RL function.
    Is it possible that I can call that rules or rule function from PL/SQL, if yes could you please help me with some ideas. (without involving BPEL)
    Thanks
    Sreejit

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Michael Kleiser ([email protected]):
    Look at this: http://www.oracle.com/oramag/code/tips2001/index.html?021201.html
    It`s a java-function which calls a os-command.
    I haven4t testet it.
    In this forum http://www.dbasupport.com/forums/showthread.php?threadid=3703
    someone asked the same question as you.
    I hope this helps you.<HR></BLOCKQUOTE>
    I've tried the tip above without success. Has anyone got it to work?
    null

  • Call report from pl-sql routine

    I just got started on the report-tool, so, this might be a very basic question, but, would appreciate your
    response.
    I have a pl-sql routine registered as a concurrent program. How do I make call to report-builder from this routine.
    Thxs,

    Hello Chirag,
    If you want to invoke and run a report from your PL/SQL code in the database, you can do so by installing and using the SRW package supplied with Reports. This package allows you to run parametrized report jobs on a specified Reports Server from your PL/SQL program and track the job status. Please take a look at the documentation for this package in the Publishing Reports manual on OTN at: http://download-west.oracle.com/docs/html/A92102_01/toc.htm.
    On the other hand, if you just need to invoke the Reports Builder program from your PL/SQL routine, you would need to use the default builtin for calling external applications from PL/SQL.
    Thanks,
    The Oracle Reports Team.

  • Call RFC From PL/ SQL

    Hi Everybody, i have some question:
    Its Possible from PL / SQL, call RFC Functions?...
    Please can you give me some examples or tell me if is technicaly impossible to do that?..
    Thanks a lot.
    Greattings
    Wilmer Figueroa

    Hey,
    It is not that easy,
    SAP didn't published an package to link PL/SQL to RFC,
    however, it is possible with some work:
    the PL/SQL can execute command on operation system of the DB
    for example 'dir' in windows or 'ls' in unix,
    instead of running dir/ls you can execute a program that will execute an RFC in the SAP system.
    the program can be developed by .Net connector, see:
    NW RFC SDK - is there a guide somewhere?

  • Calling WS from PL/SQL using WS-security

    Hi All,
    Has anyone experience with calling a Webservice from PL/SQL and use WS-security to encrypt the contents? If not; maybe with java stored procedures in 9i? (in other words: using WS-security without JDeveloper).
    with regards,
    Michiel Kuperus

    Right now what you can do is use SSL via the Java stack calling Web services ... the "call out" examples at:
    http://otn.oracle.com/tech/webservices/database.html
    show how under a PL/SQL wrapper the same java web services runtime from the middle tier running in the DB can invoke Web services. That stack supports SSL. It does not currently support WS-Security which is an emerging spec from the OASIS standards body.
    Oracle, however, is currently working on building WS-Security into its Web services stack. This is however,a post-9.0.4 (the upcoming release of Oracle9iAS) project. Bear in mind that WS-Security is still an evolving standard and while there are some early implementations they will evolve over time as the spec itself solidifies.
    Mike.

  • ERROR:SRW Packages to call report from PL/SQL.

    Hi,
    I am facing the following problem while calling a report from PL/SQL Block.
    This is my code
    SRW.Start_Debugging;
         MYPLIST :=SRW_PARAMLIST(SRW_PARAMETER('',''));
         SRW.ADD_PARAMETER(myPlist,'GATEWAY'     ,'http:..............');
         SRW.ADD_PARAMETER(myPlist,'USERID'      ,'CGIA_AUTO/AUTO_DEV@ipaddress/ORCL');
         SRW.ADD_PARAMETER(myPlist,'SERVER'      ,'rep_cgian');
         SRW.ADD_PARAMETER(myPlist,'REPORT'     ,'PGIRCGIC047.rdf');
         SRW.ADD_PARAMETER(myPlist,'DESTYPE'     ,'file');
         SRW.ADD_PARAMETER(myPlist,'DESFORMAT'     ,'pdf');
         SRW.ADD_PARAMETER(myPlist,'DESNAME'     ,'\\ipaddress\CGIA_FormPrint\WatchFolder\OTHERS\'||Z.CS_REMARKS_BL||'_'||Z.CS_CHQ_NO||'_'||M_SEQ_NO||'-'||Z.CS_FLEX_07||'-'||Z.CS_FLEX_08||'.pdf');
         SRW.ADD_PARAMETER(myPlist,'PARAMFORM'     ,'NO');
         SRW.ADD_PARAMETER(myPlist,'P_1'     ,Z.CS_BANK_CODE);
         SRW.ADD_PARAMETER(myPlist,'P_2'     ,Z.CS_BAD_ACNT_NO);
         SRW.ADD_PARAMETER(myPlist,'P_3'     ,Z.CS_CHQ_BOOK_ID);
         SRW.ADD_PARAMETER(myPlist,'P_4'     ,Z.CS_CHQ_NO);
         SRW.ADD_PARAMETER(myPlist,'P_5'     ,Z.CS_CHQ_NO);
         MYIDENT:=SRW.RUN_REPORT(MYPLIST);
    MYSTATUS := SRW.REPORT_STATUS(MYIDENT);
         SRW.STOP_DEBUGGING;
    *** Length of Paramlist : 1
    OK : Parameter added : GATEWAY=http://...
    *** Length of Paramlist : 2
    OK : Parameter added : USERID=CGIA_AUTO/AUTO_DEV@ipaddress/ORCL
    *** Length of Paramlist : 3
    OK : Parameter added : SERVER=rep_cgian
    *** Length of Paramlist : 4
    OK : Parameter added : REPORT=PGIRCGIC047.rdf
    *** Length of Paramlist : 5
    OK : Parameter added : DESTYPE=file
    *** Length of Paramlist : 6
    OK : Parameter added : DESFORMAT=pdf
    *** Length of Paramlist : 7
    OK : Parameter added :
    DESNAME=\\ipaddress\CGIA_FormPrint\WatchFolder\OTHERS\CUST000115_102024_16--.pd
    f
    *** Length of Paramlist : 8
    OK : Parameter added : PARAMFORM=NO
    *** Length of Paramlist : 9
    OK : Parameter added : P_1=SDNB
    *** Length of Paramlist : 10
    OK : Parameter added : P_2=7000674257
    *** Length of Paramlist : 11
    OK : Parameter added : P_3=7000
    *** Length of Paramlist : 12
    OK : Parameter added : P_4=102024
    *** Length of Paramlist : 13
    OK : Parameter added : P_5=102024
    Starting run_report: building url
    *** Building URL (RUN_REPORT)
    OK : URL built :
    http://ipaddress/reports/rwservlet?&USERID=CGIA_AUTO%2FAUTO_DEV%40ipaddress%2FORCL&SERVER=rep_cgian&REPORT=PGIRCGIC047.rdf&DESTYPE=file&DESFORMAT=
    pdf&DESNAME=%5C%5Cipaddress%5CCGIA_FormPrint%5CWatchFolder%5COTHERS%5CCUST00
    *** Submitting HTTP Request
    *** using URL
    :http://ipaddress/reports/rwservlet?&USERID=CGIA_AUTO%2FAUTO_DEV%ORCL&SERVER=rep_cgian&REPORT=PGIRCGIC047.rdf&DESTYPE=file&DESFORMAT
    =pdf&DESNAME=%5C%5Cipaddress%5CCGIA_FormPrint%5CWatchFolder%5COTHERS%5CCUST0001
    OK : Request submitted - Return stream : <?xml version = '1.0' encoding =
    'ISO-8859-1' standalone = 'yes'?>
    <serverQueues>
    <error code="503"
    component="REP" message="You did not specify the name of a
    report."/>
    </serverQueues>
    Here in this case even though i specify the report id in the parameter,debugger message says that 'You did not specify the name'.
    The same code is working in some other server and giving the pdf output.
    Thanks in advance for any clarification.

    Hello Chirag,
    If you want to invoke and run a report from your PL/SQL code in the database, you can do so by installing and using the SRW package supplied with Reports. This package allows you to run parametrized report jobs on a specified Reports Server from your PL/SQL program and track the job status. Please take a look at the documentation for this package in the Publishing Reports manual on OTN at: http://download-west.oracle.com/docs/html/A92102_01/toc.htm.
    On the other hand, if you just need to invoke the Reports Builder program from your PL/SQL routine, you would need to use the default builtin for calling external applications from PL/SQL.
    Thanks,
    The Oracle Reports Team.

  • About Calling PHP from Applet

    I'm developing a web page which incorporate applet. Now i want to call php(server side) from applet. It's ruuning good when the client is working in Direct Internet Connection. If client accessing internet from proxy ...how can i call the php
    With Regards
    Santhosh

    got answer :)..if any one need help post ur queries in this question.

  • Advantages of calling java from PL/SQL

    Hi experts,
    Could any one tell me the advantages of calling java program from PL/SQL?
    Regards,
    karthi

    Hi,
    You can read the free first chapter of my book @ http://www.amazon.com/gp/product/1555583296/ (see details then Excerpt)
    Kuassi http://db360.blogspot.com

  • Calling report From PL/SQL

    Hi,
    Can any one help me for, how to call a report made in D2K report 3.0 from the database PL/SQL
    THANKS
    Regards
    Gaurav

    Hi,
    I resolved the problem by chaning the DESTYPE from 'cache' to 'File'. Is there anyway to display my report output instead of saving it in as a file?
    Thanks in advance
    Thanks & Rgds,
    M Thiyagarajan

  • Calling function from PL/SQL block

    Hi,
    A very simple question.
    A have a function called "test1" in my database. It is there i double chekked.
    I would like to call this function from a block:
    DECLARE
    BEGIN
    TEST1(1202);
    END;
    This gives me an error.
    Why is this?

    user610868 wrote:
    Hi,
    A very simple question.
    A have a function called "test1" in my database. It is there i double chekked.
    I would like to call this function from a block:
    DECLARE
    BEGIN
    TEST1(1202);
    END;
    This gives me an error.
    Why is this?Hello
    A very very basic thing to do when you get an error is to include details of it. That helps narrow it down from one of the 1000s of potential Oracle errors it could be.
    Anyway, a function returns a value, and in PL/SQL you need to capture that otherwise you'll get "an error". Modify your code like so
    DECLARE
       l_Test1Val     VARCHAR2(4000); --CHANGE THIS TO BE THE SAME AS THE RETURN TYPE FOR YOUR FUNCTION
    BEGIN
       l_Test1Val :=  TEST1(1202);
    END;HTH
    David
    Edited by: Bravid on Oct 25, 2011 3:57 PM
    removed a ;

  • Call DLL from PL-SQL block

    Hello all,
    I want to call a function located in an external DLL from a PL-SQL block. I execute the followin steps :
    1. Create a database library pointing to the external DLL :
    create or replace library libstk as 'C:\SUMMIT\libstkdte_s_trade1.dll'
    2. Create the definition and the body package :
    CREATE OR REPLACE PACKAGE dllcall IS
         FUNCTION s_trade (
              s_in VARCHAR2 )
    RETURN VARCHAR2;
    PRAGMA RESTRICT_REFERENCES(s_trade, WNDS);
    end dllcall;
    show errors
    CREATE OR REPLACE PACKAGE BODY dllcall IS
    FUNCTION s_trade (s_in IN VARCHAR2) RETURN VARCHAR2
    IS EXTERNAL
    NAME "s_trade"
    LIBRARY libstk
    PARAMETERS (s_in           STRING,
    RETURN STRING);
    END dllcall;
    show errors
    set serveroutput on
    3. Start the PL-SQL block calling the external function. And I got the foolowing error :
    1 begin
    2 dbms_output.put_line ( dllcall.s_trade ( '<Request> ' ||
    3 '<CurveId>MYCURVE</CurveId> ' ||
    4 '<Mode>02</Mode> ' ||
    5 '<ExpCcy>GBP</ExpCcy> ' ||
    6 '<AsOfDate>20001023</AsOfDate> ' ||
    7 '<Entity>***SUMMIT-XML***</Entity> ' ||
    8 '</Request>') );
    9* end;
    10
    11 /
    begin
    ERROR à la ligne 1 :
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: Unable to load DLL
    ORA-06512: at "V31.DLLCALL", line 0
    ORA-06512: at line 2
    The "Read - Execute permissions" of the DLL file was given to "Authentified users" .
    What's wrong ?
    TIA
    PS : NT2K environment, DB 8.1.7
    R. Charles Emile

    Yes, a RPC was set up.
    Listner.ora
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Server1)(PORT = 1521))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = NMP)(SERVER = Server1)(PIPE = ORAPIPE))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = E:\Oracle\Ora81)
    (PROGRAM = extproc)
    tnsnames.ora
    extproc_connection_data =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA = (SID = PLSExtProc))
    Thanks
    RCE

  • Call DLL from pl/sql

    Hi Every one
    I have to call one microssoft dll from the pl/sql using form .
    How can I do it.
    Prashant

    That likely means that the DLL call failed.
    Some basics.
    A DLL exposes an interface where it lists the names of the proc/func exposed (together with a number/ordinal for each).
    The Win32 LoadLibrary() call is used to load a DLL. This returns a handle that is then used by subsequent calls to the DLL.
    In order to make the actual call, the caller needs to know the address of the procedure/function in the DLL. The GetProcAddress() is the Win32 call I remember using to get the address to call (but I think it has been deprecated since).
    Anyway, for the caller to call that proc/func in the DLL, it needs these steps:
    - load that library
    - get the "address" of that proc/func in the DLL
    - make the call
    The DLL is then executed - in the address space of the caller. Yes, the DLL's code segment is loaded once and shared amongst how ever many executables are using that DLL. But the DLL has no data segment - the data segment of the DLL lives in the address space of the caller.
    Should the DLL do something dirty/wrong, it can crash the caller by corrupting its address space. Or the DLL call could simply fail, throw an exception and terminate unexpectedly.
    This is the basics of the a DLL call - and also why Oracle wants to run that DLL call externally using the EXTPROC interface, so as not to risk that DLL compromising the memory space of the Oracle server process.
    This makes it a tad more complex now as the Oracle server process makes a call to EXTPROC (an IPC/RPC call) - and the EXTPROC process makes the DLL call (as described above).
    If that EXTPROC process crashes, the call that the Oracle server process made also terminates unexpectedly.
    Why can the EXTPROC process crash? Well, there are more meaningful errors returned when the DLL fails to load in my experience. So I expect that your DLL was found and that the EXTPROC process did a successful LoadLibrary() call - and even made a successful GetProcAdress() (or whatever call).
    But when the actual call to the DLL func/proc was made, an error resulted (incorrect parameter passing, invalid data types being passed, invalid memory being referenced, etc).
    This error caused a fatal error and terminated the EXTPROC process. No meaningful error was therefore returned to the Oracle server process - so it throws the exception "lost RPC connection to external process".
    Hope this was not too technical and you got the gist of it.

  • Calling Webservice from Pl/sql

    Hi All,
    Can any one give me a detailed example, to call a web service from a pl/sql package. preferably by POSt method.
    Thank you!

    check this out for some ideas: http://www.bloggingaboutoracle.org/archives/calling-web-services-from-plsql

  • Calling php from java

    Hi all!
    I've searched everywhere and I can't find a solution.
    How can I call a php script from java?
    What I want to do is to open a pop-up window when I click a node from a tree, something like this: http://192.168.2.111/SecuritySystem/Security/main.php?user=admin&pass=1234"
    user and pass are properties of a session bean.
    I can open a pop-up window running a javascript code, but if I do it, I can not read the user and pass properties form the session bean.
    Any solution will be really helpful for me. Thanks in advance.

    try{
    URL url = new URL("http://webserver/php/create.php");
    HttpUrlConnection conn = url.openConnection();
    conn.connect();
    conn.disconnect();
    }catch(Exception e){
        e.printStackTrace();
    }Please reply if it works as you expected ;-)

Maybe you are looking for