Just so everyone knows, I am aware that ACGI Dispatcher will do this for me. If I wasn’t so obsessed with figuring it out I would just drop the $35 and buy it, but I have become Ahab. The solution my white whale.
Here’s where I am at:
I have modified Apples Webpage Helper application to receive form variables from my test form and parse through them, look up a user in FM Pro, create a basic HTML page with the variables in it, and then?
You see below a working script that will simply echo back the HTML page from the variables, it is the last step in my process meant to create (or serve if you will) a new webpage for the end user. I have tried to use ‘echo’ and ‘printf’ and while neither of them give me any errors they also do not give me a webpage in my browser. Maybe I am thinking of the process all wrong - in my mind I see the form in the browser as the starting point of a path and as long as the process remains unbroken (ie: no script errors, power failures, etc.) the path will loop around and “echo” the webpage back to the originating browser. right now everything works EXACTLY as I envision it - except for the webpage going to the browser bit. It seems to echo or printf into the void.
Maybe this is an Apache configuration issue, maybe a Unix one, it may even be a problem with my apple scripting (though I don’t think so). If anyone here is a Unix or Apache aficionado, do you have any ideas I can try? Did I need that #! /bin/sh/ thing before the Content-type: text/html? Does the application have to be in the CGI-Executables folder to run right (it is, but does it have to be)?
set lHTMLTitle to "Thank you"
set lPageHeader to "It has been determined that the following queue would be the fastest to process your job -"
set lBodyCopy to "WebDAV address / FTP Address / User Name / Inbox" -- Get this info from FM Pro at runtime
set lHTMLReply to ("Content-type: text/html" & return & return & "<HTML><HEAD>" & return & "<TITLE>" & lHTMLTitle & "</TITLE>" & return & "</HEAD><BODY>" & return & "<H1>" & lPageHeader & "</H1>" & return & return & lBodyCopy & return & "</BODY></HTML>") as text
-- Log the assignment to the Main server DB
do shell script ("echo \"" & lHTMLReply & "\"") -- I have also tried 'printf' but can't seem to get 'cat' to work
If this bears no fruit I will indeed be forced to buy the ACGI Dispatcher application, but it will be with the bitter taste of defeat in my mouth.
Well, no help here AND James Sentman apparently doesn’t respond to his emails for help with ACGI Dispatcher… Quite the conundrum.