Running PL/SQL scripts from PHP

This is a discussion on Running PL/SQL scripts from PHP within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi. Is there a way to execute PL/SQL scripts from PHP? I have PL/SQL scripts that utilizes the ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-22-2004
Dung Nguyen
 
Posts: n/a
Default Running PL/SQL scripts from PHP

Hi.

Is there a way to execute PL/SQL scripts from PHP? I have PL/SQL scripts
that utilizes the DBMS_xxx packages. Is it possible to shell out a command
that will run the PL/SQL?

-DN


Reply With Quote
  #2 (permalink)  
Old 01-22-2004
-linux_lad
 
Posts: n/a
Default Re: Running PL/SQL scripts from PHP

In news:bup1l1$t59$1@woodrow.ucdavis.edu,
Dung Nguyen <dung@ucdavis.edu> typed:
> Hi.
>
> Is there a way to execute PL/SQL scripts from PHP? I have PL/SQL
> scripts that utilizes the DBMS_xxx packages. Is it possible to shell
> out a command that will run the PL/SQL?
>
> -DN

Yes. Use the system function. Apache must have permission to run the script.

--
-linux_lad
To verify that this post isn't forged, click here:
http://www.spoofproof.org/verify.php...41fcc44bf8b50f


Reply With Quote
  #3 (permalink)  
Old 01-22-2004
Andy Hassall
 
Posts: n/a
Default Re: Running PL/SQL scripts from PHP

On Thu, 22 Jan 2004 09:35:29 -0800, "Dung Nguyen" <dung@ucdavis.edu> wrote:

>Is there a way to execute PL/SQL scripts from PHP? I have PL/SQL scripts
>that utilizes the DBMS_xxx packages. Is it possible to shell out a command
>that will run the PL/SQL?


You'll have to define what you mean by 'PL/SQL script'.

Do you mean a PL/SQL block? Just use OCIParse/OCIExecute. There's an example
in the PHP manual.

Or do you mean you have a file containing one or more SQL and/or anonymous
PL/SQL blocks, which you'd normally run with SQL*Plus? And in particular, does
it use any SQL*Plus commands? (e.g. SET, or COLUMN). If so, shell out to
SQL*Plus with system() or exec() or backticks etc.

--
Andy Hassall <andy@andyh.co.uk> / Space: disk usage analysis tool
<http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>
Reply With Quote
  #4 (permalink)  
Old 01-23-2004
Steve Holdoway
 
Posts: n/a
Default Re: Running PL/SQL scripts from PHP

On Thu, 22 Jan 2004 09:35:29 -0800, "Dung Nguyen" <dung@ucdavis.edu>
wrote:

>Hi.
>
>Is there a way to execute PL/SQL scripts from PHP? I have PL/SQL scripts
>that utilizes the DBMS_xxx packages. Is it possible to shell out a command
>that will run the PL/SQL?
>
>-DN
>

You can compile php to have oracle oci calls incorporated. This works
for oracle 7 and 8, but I haven't tried it with oracle 9. Personally,
i'd build a package in the database, and then call the stored
procedures from the php... easier to maintain!

Steve
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:18 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0