tags:

views:

144

answers:

1

Hi,

I am using Oracle Application Express and I was wondering whether it's possible to call php inside a pl/sql page process?

Can I use htp.p or htp.prn in pl/sql?

For example, let's say I have a php function on the server that returns the remote_addr of the local machine - I basically would like to capture this function value and add it to an oracle log table that I have created.

Hoping someone can assist.

Thanks.

A: 

Sounds ugly. As I understand it, the web server takes the browser request, and fires it off to either the database or the PHP 'server' (or preprocessor or whatever) or services it directly (if it is comesthing like a javascript library sitting as a flat file on the web server).

If you want Oracle to 'see' the result of the PHP function, the only way would be for the PHP server to execute the function first, before passing the request (and function result) to Apex.

I think you are best off looking at how the PHP determines the remote_addr (eg is it just looking at a CGI_ENV variable) and replicating that in the database.

Gary