Well, here it is several months later but after a number of digressions I'd really like to finally learn CGI with PowerBASIC. Presently I'm stuck though. I can't get Joe's example or any other CGI example to work. Here is where I'm at....
I followed Joe's recommendations and downloaded and installed the X1 version of the Abyss Web Server. I followed the standard install and it is located in "C:\Program Files\Abyss Web Server" on a Win 2000 Pro Laptop. Under that directory are the following folders...
adn
console
doc
htdocs
kcstore
lang
log
I downloaded Joe's Contact.htm and placed it in \htdocs. Is that the right place? From my studying of Joe's tutorial #1 I gather that it is.
I put PBCgi.inc in my PB \Includes folder so I could compile his Contact.bas to an exe and that went fine. I wasn't sure where that should go in the above directory schema so I put it in htdocs too (more about that later).
Also, I noted, copied, printed out and studied in great detail the various interactions John Tate had here in his learning process. On Mar 10th, 2008, 01:59 PM at...
in his "Abyss Server Requirements" post he noted that when he clicks the 'Submit' button he receives various errors and the CGI program doesn't work. David Warner was kind enough to point out that it would probably be necessary to tell Abyss about CGIs through a 'Script Path' entry...
This struck me as very important so I did likewise.
However, I still can't get anything to work. When the Abyss Web Server brings up contact.htm and I click the button nothing happens. Nothing at all. I know how the program should work because I tried it on Joe's website. After one fills out the form and clicks the Submit button the brouser somehow passes this line back to the server...
action="/cgi-bin/contact.exe"
which is suppossed to call contact.exe. However, on my machine nothing happens. No errors...nothing. In studying Joe's tutorial I found this...
When this didn't work for me I examined that line in contact.htm and I suspected that I may have to either change the .htm line to reflect where I had put the Contact.exe program, or create the cgi-bin directory under Abyss Web Server so that my paths coincide with the calls. Well, I tried all that in addition to modifying the scripting path to recognize the added cgi-bin directory...
Virtual Path: /cgi-bin/*.exe
...but all to no avail. Out of desperation I put Contact.exe in every folder in the installation all the way up to \Program Files but this didn't help. Finally, there is a check box in the 'Scripting Parameters' Screen that reads
"Enable Script Execution"
I tried with both checked and unchecked but no luck. Also, Shawn Anderson posted a nice simple little example in the fourth post of...
in answer to a question of Mark Pruitt, but naturally that doesn't work for me either. So at this point I'd surely appreciate if someone could give me some pointers because with my very limited knowledge of this stuff I've pretty much run out of ideas.
I followed Joe's recommendations and downloaded and installed the X1 version of the Abyss Web Server. I followed the standard install and it is located in "C:\Program Files\Abyss Web Server" on a Win 2000 Pro Laptop. Under that directory are the following folders...
adn
console
doc
htdocs
kcstore
lang
log
I downloaded Joe's Contact.htm and placed it in \htdocs. Is that the right place? From my studying of Joe's tutorial #1 I gather that it is.
I put PBCgi.inc in my PB \Includes folder so I could compile his Contact.bas to an exe and that went fine. I wasn't sure where that should go in the above directory schema so I put it in htdocs too (more about that later).
Also, I noted, copied, printed out and studied in great detail the various interactions John Tate had here in his learning process. On Mar 10th, 2008, 01:59 PM at...
in his "Abyss Server Requirements" post he noted that when he clicks the 'Submit' button he receives various errors and the CGI program doesn't work. David Warner was kind enough to point out that it would probably be necessary to tell Abyss about CGIs through a 'Script Path' entry...
Hi John,
have you told Abyss about executable files by creating a 'Script Path' entry?
Open the 'Abyss Web Server Console' then click on...
Hosts...
Configure...
Scripting Parameters...
Script Paths...
Add...
Set the following...
Virtual Path: /*.exe
have you told Abyss about executable files by creating a 'Script Path' entry?
Open the 'Abyss Web Server Console' then click on...
Hosts...
Configure...
Scripting Parameters...
Script Paths...
Add...
Set the following...
Virtual Path: /*.exe
However, I still can't get anything to work. When the Abyss Web Server brings up contact.htm and I click the button nothing happens. Nothing at all. I know how the program should work because I tried it on Joe's website. After one fills out the form and clicks the Submit button the brouser somehow passes this line back to the server...
action="/cgi-bin/contact.exe"
which is suppossed to call contact.exe. However, on my machine nothing happens. No errors...nothing. In studying Joe's tutorial I found this...
The main part to examine is the bolded ‘form’ tag. this creates the block of code that informs the server what to do when a ‘submit’ button is clicked. in this case, the data in each of the form fields will be sent to the program called contact.exe that is located on the web server in the document root folder in the cgi-bin directory. This is a standard location for cgi programs to reside, but is totally dependent upon how the web server is configured. the method used to send the data is post...
Virtual Path: /cgi-bin/*.exe
...but all to no avail. Out of desperation I put Contact.exe in every folder in the installation all the way up to \Program Files but this didn't help. Finally, there is a check box in the 'Scripting Parameters' Screen that reads
"Enable Script Execution"
I tried with both checked and unchecked but no luck. Also, Shawn Anderson posted a nice simple little example in the fourth post of...
in answer to a question of Mark Pruitt, but naturally that doesn't work for me either. So at this point I'd surely appreciate if someone could give me some pointers because with my very limited knowledge of this stuff I've pretty much run out of ideas.
Comment