Thanks in advance for any help. I'm looking for a way to pass data
from php to perl. Basically, I want to take some dynamic data from a
database, mixed with user input, then reformat it to make a new set of
variables and pass those variables to a perl script to do all the hard
work.
Anyway, I can handle the database connectivity, and putting variables
together, but how do I pass the variables to perl?
I have seen other comments on this, but many suggest bringing the data
back to php to print out. Unfortunately, the output is more than text
- it includes pictures. So obviously, I need the perl script to output
as if it was called from a browser.
I really want to avoid any intermediate pages if possible.
Thanks,
Shane 9 2760
wrote: Thanks in advance for any help. I'm looking for a way to pass data from php to perl. Basically, I want to take some dynamic data from a database, mixed with user input, then reformat it to make a new set of variables and pass those variables to a perl script to do all the hard work.
Anyway, I can handle the database connectivity, and putting variables together, but how do I pass the variables to perl?
I have seen other comments on this, but many suggest bringing the data back to php to print out. Unfortunately, the output is more than text - it includes pictures. So obviously, I need the perl script to output as if it was called from a browser.
You can't. A page with pictures are at least 2 objects from a browser's
point of view, so you can't return 2+ objects as one object (unless you
render the page to one object yourself).
I really want to avoid any intermediate pages if possible.
You either return data to PHP, or you have the PHP program redirect you
to the perl program. You can't have something in between.
I would drop PHP all together. You can do the database connectivity in
Perl, etc. Or the other way around. What is it you can do in Perl but
can't in PHP ( ok, not loosing time on bad documentation and weird side
effects ).
--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
I could code it in perl, but PHPis soooo easy to manipulate anything
from a database, and I want to create many interfaces to this perl
program in the future, so if this is possible, I could potentially save
myself a lot of time working with PHP.
Now when you say "Have the PHP program redirect you to the perl
program", that sounds a lot like what I want to do. The problem is
passing the variables as if they were form data to the perl script.
Any thoughts? Or am I dead in the water?
Thanks for the help!
Shane
wrote: I could code it in perl, but PHPis soooo easy to manipulate anything from a database,
*ROTFLMAO*
since when? And since when is that hard in Perl?
and I want to create many interfaces to this perl program in the future, so if this is possible, I could potentially save myself a lot of time working with PHP.
Now when you say "Have the PHP program redirect you to the perl program", that sounds a lot like what I want to do. The problem is passing the variables as if they were form data to the perl script. Any thoughts? Or am I dead in the water?
redirect to http://example.invalid/cgi-bin/yours...1=value1&name2
=value2&etc.
But note that if the images also need to be dynamically generated that you
need more weird redirecting.
Please read the documentation of CGI.pm, DBI etc. and save yourself a lot
of troubles.
--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
John Bokma wrote: wrote:
I could code it in perl, but PHPis soooo easy to manipulate
anything from a database, *ROTFLMAO*
Okay, so I'm just too lazy to dust off my perl books ;-)
redirect to
http://example.invalid/cgi-bin/yours...1=value1&name2 =value2&etc.
Yeah, but you can't pass more than 2,038 characters that way, right?.
We're talking about (potentially) a lot of data.
I guess I'll just use perl and save the headaches. Thanks for the
help.
Shane
On Tue, 08 Mar 2005 17:44:20 -0800, google_nospam wrote: I could code it in perl, but PHPis soooo easy to manipulate anything from a database, and I want to create many interfaces to this perl program in the future, so if this is possible, I could potentially save myself a lot of time working with PHP.
Now when you say "Have the PHP program redirect you to the perl program", that sounds a lot like what I want to do. The problem is passing the variables as if they were form data to the perl script. Any thoughts? Or am I dead in the water?
Thanks for the help!
Shane
Instead of HTTP redirects which will get complicated, try serializing the
information somehow. Save it to a plaing text file in serialzed form. Use
XML, WDDX, or something like that. http://www.devshed.com/c/a/Perl/Using-Perl-With-WDDX http://us4.php.net/wddx
I don't know what happened to WDDX exactly, but it looks dead. Even so,
it can still be useful.
As for XML, you're on your own. Good starting place: http://us4.php.net/manual/en/ref.xml.php
--
JDS | je*****@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
JDS wrote: On Tue, 08 Mar 2005 17:44:20 -0800, google_nospam wrote:
I could code it in perl, but PHPis soooo easy to manipulate anything from a database, and I want to create many interfaces to this perl program in the future, so if this is possible, I could potentially save myself a lot of time working with PHP.
Now when you say "Have the PHP program redirect you to the perl program", that sounds a lot like what I want to do. The problem is passing the variables as if they were form data to the perl script. Any thoughts? Or am I dead in the water?
Thanks for the help!
Shane Instead of HTTP redirects which will get complicated, try serializing the information somehow. Save it to a plaing text file in serialzed form. Use XML, WDDX, or something like that.
Ouch: file locking etc. http://www.devshed.com/c/a/Perl/Using-Perl-With-WDDX http://us4.php.net/wddx
I don't know what happened to WDDX exactly, but it looks dead. Even so, it can still be useful.
As for XML, you're on your own. Good starting place: http://us4.php.net/manual/en/ref.xml.php
SOAP, XML-RPC?
Perl does that quite easily. Guess PHP too.
--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
JDS wrote: On Fri, 11 Mar 2005 03:36:51 +0000, John Bokma wrote:
Depends on server afaik. I wouldn't rely on it.
Depends on browser, actually. At least the 2038 charcter number
I am sure every server has a limit, could be it's higher than 2038
(technically it can also be trimmed down by the OS, since it's passed in an
environment variable).
But the most important thing: don't do it.
--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Romuald Favre |
last post by:
Hi there,
I just installed Perl (v. 5.6.1. built for MSWin32 from ActiveState)
on a new server Windows 2000.
Amazingly the passing of arguments doesn't work !
I saved the following code in a...
|
by: Joe |
last post by:
I am trying to write a Perlscript to be used with some HTML pages. Here is
how it works:
1.. The first HTML page has a form which requests for user input. Then it
passes the QUERY_STRING...
|
by: Matthew |
last post by:
I've been trying to find a way to gather up data contained in a table
or tables on a previously generated html page in order to send it to a
cgi for further processing. Ideally this would scrape...
|
by: Dave Hammond |
last post by:
In document "A.html" I have defined a function and within the document
body have included an IFRAME element who's source is document "B.html".
In document "B.html" I am trying to call the function...
|
by: patsman77 |
last post by:
Hello All,
I am trying to pass records to a mysql database, but it is only passing 1 record...
What I have so far, is it pulls selections from database, calculates weather the selection is a...
|
by: KevinADC |
last post by:
Introduction
In part one we discussed the default sort function. In part two we will discuss more advanced techniques you can use to sort data. Some of the techniques might introduce unfamiliar...
|
by: KevinADC |
last post by:
If you are entirely unfamiliar with using Perl to sort data, read the "Sorting Data with Perl - Part One and Two" articles before reading this article. Beginning Perl coders may find this article...
|
by: Kelicula |
last post by:
Hey everyone!
I am back.
I have a script that handles the private messaging for a site I am working on and I created a subroutine to handle the sending of a message.
I want to check if the "to"...
|
by: vijayarl |
last post by:
Hi all,
i have perl script, which is used to send mail. its a command line utility.
if we run this perl script in command line by passing all it's required arguments, it works very well.there no...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |