You are correct, I'm not very familiar with Perl.
If I do go the route of using something else to accept the form data and
then executing the PHP script, I'd be leaning more toward somehow
executing the PHP script directly rather then sending back a redirect to
the user-agent to re-send the request to the PHP script. Reason being
that if a file is uploaded, it ends up getting sent twice. For a large
file, that's a lot of extra HTTP traffic.
Anyhow, after much talk and some pretty innovative suggestions, I think
I'm going to...
1. Put in a feature request to have the entire POST body, unaltered,
dumped to a temp file. And in the mean time...
2. Reconstruct an identical POST body from the $_POST[] array, with some
trial-and-error form field renaming (in the case of server-side image
maps) and placement of uploaded files. (Slow, I know, and not
guaranteed to work everywhere, but it keeps the script as portable as
possible.)
3. Instruct page designers to refrain from using "special" characters in
form field names when using this script. And also suggest to page
designers to try to keep the number of server-side image maps and file
uploads at a minimum, for speed and performance reasons.)
4. Provide the capability for the PHP script to execute a user-defined
include file and read a user-defined file for the POST body. This would
allow future improved operation in case the feature request ever
materializes, or a sysadmin uses an external process (Perl or whatever
else) to dump the POST body to a file.
Myron Turner wrote:
Richard Lynch wrote:
On Sat, April 21, 2007 10:56 pm, Myron Turner wrote:
At that point, why not just have Perl call PHP?
Surely Perl can do something not unlike 'exec' or whatever to run any
shell script you want...
I sure wouldn't do another round trip to the browser and add JS into
the middle of this solution, if it's viable...
Wouldn't work for me, as I can't do Perl.
Perl could, could of course do the whole job. But since the Original
Poster was (I assumed) not particularly familiar with Perl, I was
essentially providing a Perl script to do the base essentials. So my
hack would put him right back into PHP. If he execs from Perl to a
PHP script to do the processing, then he would have to augment the
Perl script to send back HTML to the browser, and if he can do that he
can probably stick with the Perl altogether. Anyway, that was my
reasoning.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php