473,698 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Jul 17 '05 #1
3 9770
In news:bu******** **@woodrow.ucda vis.edu,
Dung Nguyen <du**@ucdavis.e du> 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
Jul 17 '05 #2
On Thu, 22 Jan 2004 09:35:29 -0800, "Dung Nguyen" <du**@ucdavis.e du> 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 <an**@andyh.co. uk> / Space: disk usage analysis tool
<http://www.andyh.co.uk > / <http://www.andyhsoftwa re.co.uk/space>
Jul 17 '05 #3
On Thu, 22 Jan 2004 09:35:29 -0800, "Dung Nguyen" <du**@ucdavis.e du>
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
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2867
by: Rolfe | last post by:
Hi, I struggled, and got mod_python running on Apache/Win2k. Follow these instructions verbatim and you shouldn't have any trouble. These instructions are based on "http://www.modpython.org/live/current/doc-html/inst-testing.html". I've added specific information such as Windows filepaths and filenames so there's no ambiguity on what you should do. I encourage you to copy and paste to avoid typing errors. Cheers, Rolfe
4
4160
by: Peter Otten | last post by:
Is there a way to limit both width and height of a canvas text item? My current workaround seems clumsy: import Tkinter as tk root = tk.Tk() canvas = tk.Canvas(root, width=400, height=200, bg="white") canvas.pack() # simulate a clipped text item - never transparent :-( s = "The long and winding road.."
1
2531
by: Patrick | last post by:
Hi, The company's database has multiple schema. If I want to modify a stored procedure, which is saved as a script (something like abc.sql), I opened that script in Query Analyser, made the changes, tested in Development Schema and saved it. After that, if I want to make those changes to other schemas, of course I can select different schemas and run the script. If there are many many schema, there is a likelihood that we miss one...
3
1655
by: Sravani | last post by:
Hi, I am setting up a new server for an already running website. The problem is the person before me ran ASP scripts on .html extension pages (The old machine is a windows 2000 server with IIS 5.0). Now when I transfer all the pages on to the new machine I am having trouble running the ASP scripts on the .html pages. The pages work fine when I rename them to .asp. But with the ..html extension I cannot run the scripts. I am thinking that I...
4
6006
by: Nick Sinclair | last post by:
Hi all, I'm new to C. I have successfully written a small C program that acts as a "wrapper" around cgi scripts. These scripts perform admin tasks such as backing up etc. Obviously, The need for the "wrapper" was to get the scripts to run with "root" privileges. So far so good. I simply create a "URL shortcut" that some staff can double-click on to initiate the process. However, because I am creating these automated tasks for...
1
1875
by: edovale | last post by:
Hi there, I am trying to create a db on db2 and when running the scripts, which have been successfully ran before, I get the following error: DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL1224N A database agent could not be started to service a request, or was
2
4869
by: Dave Hughes | last post by:
Just noticed something rather annoying after upgrading my test box (a Linux server running DB2 UDB v8 for LUW) to fixpak 11 (for reference it was previously on fixpak 7). In the past I've relied heavily on the ability to start multiple long-running SQL scripts in the background and have them all run in parallel. Unfortunately, it seems that somewhere between fixpak 7 and fixpak 11 something has been fixed / broken which prevents more...
6
3943
by: Ishpeck | last post by:
I'm using Python to automate testing software for my company. I wanted the computers in my testing lab to automatically fetch the latest version of the python scripts from a CVS repository and then ask a local database server which of the scripts to run. I built the following: #!/bin/bash # Batcher will run the specified scripts.
24
2833
by: Mark | last post by:
Hi, I'm new to python and looking for a better idiom to use for the manner I have been organising my python scripts. I've googled all over the place about this but found absolutely nothing. I'm a linux/unix command line guy quite experienced in shell scripts etc. I have a heap of command line utility scripts which I run directly. What is the best way to create python command line scripts but exploit the (loadonly) speed-up benefit of...
22
3819
by: V S Rawat | last post by:
(bringing the discussion here for php.general) I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL 5.0.51b. http://localhost/ is E:\wamp\www\ I have put the first php script to hello.php file: <html> <head> <title>PHP Test</title>
0
8604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2330
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.