HighDots Forums  

Will this work?

alt.html alt.html


Discuss Will this work? in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Aardvark
 
Posts: n/a

Default Re: Will this work? - 08-02-2009 , 05:10 PM






On Sun, 02 Aug 2009 21:01:05 +0000, Bluuuuuue Rajah wrote:

Quote:
Scott Bryce <sbryce (AT) scottbryce (DOT) com> wrote in
news:h52m6v$t0u$1 (AT) news (DOT) eternal-september.org:

Bluuuuuue Rajah wrote:
I'm teaching myself HTML forms, but I don't have a web address, so I
need to patch together an unconventional way to connect my CGI
script to my HTML form. I need to make the usual client/server
exchange work with both client and server located on the same PC.

In order to do this, you will need to have a server running on your
local machine. You can download Apache server, figure out how to
configure it, launch it, then send your request to localhost.

Details about how to do this are off topic in alt.html. Unfortunately,
the best newsgroup to ask this question went defunct years ago. You
could try alt.www.webmaster, or find a newsgroup that discusses Apache
server.

If that were the case, my FORM command would use an ACTION statement
that looked something like ACTION="c:/dir1/dir2/.../script.exe".
Will that work?

The address will have to be in a form the server recognizes, not one
that your operating system recognizes. I usually use relative
addresses. This makes things simpler, but are not totally bullet proof
when you post the code, though I have never had a problem.

action='cgi-bin/myscript.exe'

One thing that makes me nervous is that this is supposed to be a URI,
which means that I would expect to put "http://" at the start of it.
But if I put something that starts with "http://c:/" at the start of
the pathname, that syntax doesn't look right to me. I would expect to
get some kind of run-time error, when the computer tried to parse
that.

Yes, well, that is why you need a server set up on your local machine.
The server will know how to process http requests. your operating
system does not know how. And your sever will not know what c:\ means.

Can I pull this off, or is this way of doing things expressly
forbidden by http?

You can pull this off by running a server on your local machine. Once
you have the sever set up and running, you will need to have the
server, not the operating system, serve the HTML file.

Don't load c:\mydirectory\myhtmlfile.html.

Load http://localhost/mydirectory/myhtmlfile.html.

This way the server will know how to parse the relative addresses.
Otherwise your action will have to point to a fully qualified URI.

http://localhost/mydirectory/cgi-bin/myscript.exe

That should get you pointed in the right direction.

Thanks for all the useful suggestions. I looked for the Windows XP
version at apache.org and found a file called "apache_2.2.11-win32-x86-
no_ssl.msi". Is that the one I want?

It is, although I think there's also a version with ssl if you need it.

Quote:
I was expecting an .exe file and have never heard of an .msi file, but
that seems to stand for "microsoft install." Am I right about that?
Once again, spot on.

Download, double-click and install. During the install you'll be asked to
enter a few elementary configurations, but once it's done, you should be
able to fire your Apache up, point your browser to 127.0.0.1 and hey
presto, there's the default index page on your very own server.

It wouldn't be a bad idea to set up an ftp server as well in order to more
easily upload web pages and scripts to the Apache server.

Reply With Quote
  #12  
Old   
Aardvark
 
Posts: n/a

Default Re: Will this work? - 08-02-2009 , 05:15 PM






On Sun, 02 Aug 2009 20:56:14 +0000, Bluuuuuue Rajah wrote:

Quote:
Adrienne Boswell <arbpen (AT) yahoo (DOT) com> wrote in
news:Xns9C5AC592541CFarbpenyahoocom (AT) 188 (DOT) 40.43.213:

Gazing into my crystal ball I observed Bluuuuuue Rajah
Bluuuuuue (AT) Rajah (DOT) Com> writing in news:Xns9C5ACAB899B16fdgdfjhsrtg@
188.40.43.213:

If that were the case, my FORM command would use an ACTION statement
that looked something like ACTION="c:/dir1/dir2/.../script.exe". Will
that work?

As others have said, you need to set up a server on your machine. If
you are running Windows (at least XP Pro), you can use IIS. Yes, it is
different from Apache, and does not have a lot of the great bells and
whistles, but for a testing server, s'all right.

I'm thinking of using Apache, unless the setup procedure for IIS is much
simple than Apache. Is that the case?
The *basic* setup for Apache is simple (ie if all you want to do is show
web pages in your browser) but it's a powerful little thing and scaleable.
You could eventually configure it to do anything you would ever dream of
doing on a web server. It's all in the configuration file, the sections of
which are explained well actually within the file.

I set up IIS once years ago and as I recall it was a little more difficult
to come to grips with than Apache.

Reply With Quote
  #13  
Old   
Scott Bryce
 
Posts: n/a

Default Re: Will this work? - 08-02-2009 , 05:51 PM



Aardvark wrote:
Quote:
It wouldn't be a bad idea to set up an ftp server as well in order to
more easily upload web pages and scripts to the Apache server.

Why? The files on his local machine are already on his local machine.
All he has to do is set up an alias and/or script alias in the config file.

Or are you talking about using a local FTP server to transfer files to
the web server? I just use an FTP program to do that.

Reply With Quote
  #14  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: Will this work? - 08-02-2009 , 05:51 PM



In alt.html, Bluuuuuue Rajah wrote:

Quote:
I'm thinking of using Apache, unless the setup procedure for IIS is
much simple than Apache. Is that the case?
Back when I had Windows computers, I used this:
http://www.wampserver.com/en/

Prior, I used IIS. I think WAMP is much easier.

--
-bts
-Friends don't let friends drive Windows

Reply With Quote
  #15  
Old   
dorayme
 
Posts: n/a

Default Re: Will this work? - 08-02-2009 , 06:28 PM



In article <h5529c$l64$1 (AT) news (DOT) eternal-september.org>,
Scott Bryce <sbryce (AT) scottbryce (DOT) com> wrote:

Quote:
Or are you talking about using a local FTP server to transfer files to
the web server? I just use an FTP program to do that.
On my Mac computer, the files made for web pages are in folders (one for
each website) in a folder called Sites. They are already on the local
server before they are, it is a sort of magic quantum thing. Get a Mac
and see.

--
dorayme

Reply With Quote
  #16  
Old   
Aardvark
 
Posts: n/a

Default Re: Will this work? - 08-02-2009 , 08:10 PM



On Sun, 02 Aug 2009 15:51:47 -0600, Scott Bryce wrote:

Quote:
Aardvark wrote:
It wouldn't be a bad idea to set up an ftp server as well in order to
more easily upload web pages and scripts to the Apache server.


Why? The files on his local machine are already on his local machine.
That's right.I only suggested it because I personally found it easier when
building webs in the past to keep an FTP client open and connected to my
server and edit the pages through that. It was also educational, setting
up ftp on the server. The mileage of others may vary, and probably
does :-)

Quote:
All he has to do is set up an alias and/or script alias in the config
file.

Or keep his document root folder open while he's working on pages and
scripts. More than one way to skin a cat.

Quote:
Or are you talking about using a local FTP server to transfer files to
the web server? I just use an FTP program to do that.
Yup. A bit 'sledgehammer to crack a walnut' but it's something I got into
the habit of doing.

Reply With Quote
  #17  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: Will this work? - 08-02-2009 , 09:06 PM



Bluuuuuue Rajah wrote:

Quote:
Aardvark <aardvark (AT) youllnever (DOT) know> wrote
fire your Apache up, point your browser to 127.0.0.1

How come you guys keep mentioning 127.0.0.1? Is that address special
in some way?
<gulp!>

Pehaps you're not quite ready for having your own server. But if you do
decide to press on, do look at the wampserver.com link I posted several
hours ago.

--
-bts
-Friends don't let friends drive Windows

Reply With Quote
  #18  
Old   
Bluuuuuue Rajah
 
Posts: n/a

Default Re: Will this work? - 08-02-2009 , 09:08 PM



Aardvark <aardvark (AT) youllnever (DOT) know> wrote in
news:Vgndm.121087$OA1.856 (AT) newsfe29 (DOT) ams2:

Quote:
On Sun, 02 Aug 2009 21:01:05 +0000, Bluuuuuue Rajah wrote:

Scott Bryce <sbryce (AT) scottbryce (DOT) com> wrote in
news:h52m6v$t0u$1 (AT) news (DOT) eternal-september.org:

Bluuuuuue Rajah wrote:
I'm teaching myself HTML forms, but I don't have a web address, so
I
need to patch together an unconventional way to connect my CGI
script to my HTML form. I need to make the usual client/server
exchange work with both client and server located on the same PC.

In order to do this, you will need to have a server running on your
local machine. You can download Apache server, figure out how to
configure it, launch it, then send your request to localhost.

Details about how to do this are off topic in alt.html.
Unfortunately, the best newsgroup to ask this question went defunct
years ago. You could try alt.www.webmaster, or find a newsgroup that
discusses Apache server.

If that were the case, my FORM command would use an ACTION
statement
that looked something like ACTION="c:/dir1/dir2/.../script.exe".
Will that work?

The address will have to be in a form the server recognizes, not one
that your operating system recognizes. I usually use relative
addresses. This makes things simpler, but are not totally bullet
proof when you post the code, though I have never had a problem.

action='cgi-bin/myscript.exe'

One thing that makes me nervous is that this is supposed to be a
URI,
which means that I would expect to put "http://" at the start of
it. But if I put something that starts with "http://c:/" at the
start of
the pathname, that syntax doesn't look right to me. I would expect
to get some kind of run-time error, when the computer tried to
parse that.

Yes, well, that is why you need a server set up on your local
machine. The server will know how to process http requests. your
operating system does not know how. And your sever will not know
what c:\ means.

Can I pull this off, or is this way of doing things expressly
forbidden by http?

You can pull this off by running a server on your local machine.
Once you have the sever set up and running, you will need to have
the server, not the operating system, serve the HTML file.

Don't load c:\mydirectory\myhtmlfile.html.

Load http://localhost/mydirectory/myhtmlfile.html.

This way the server will know how to parse the relative addresses.
Otherwise your action will have to point to a fully qualified URI.

http://localhost/mydirectory/cgi-bin/myscript.exe

That should get you pointed in the right direction.

Thanks for all the useful suggestions. I looked for the Windows XP
version at apache.org and found a file called
"apache_2.2.11-win32-x86- no_ssl.msi". Is that the one I want?

It is, although I think there's also a version with ssl if you need
it.
I didn't see it. For XP, there are only two versions in there, and they
both say "no_ssl."

Quote:
I was expecting an .exe file and have never heard of an .msi file,
but that seems to stand for "microsoft install." Am I right about
that?

Once again, spot on.

Download, double-click and install. During the install you'll be asked
to enter a few elementary configurations, but once it's done, you
should be able to ...
Thanks. I'll walk through the setup and see if there's anything I don't
understand. When the .msi file unpackages itself, will I find a document
in there telling me how to decide on the various choices I'll be asked to
make?

Also, how do I test that it's working, once the install is done? I don't
want to test it by writing a page that asks the server to send "Hello
World" when I click "Submit," because I've never done that before either,
so I have to test the two separately. You can't test two things that
you've never done at the same time, because when it doesn't work, you don't
know which stage is broken.

Quote:
fire your Apache up, point your browser to 127.0.0.1
How come you guys keep mentioning 127.0.0.1? Is that address special in
some way?

Quote:
and hey presto, there's the default index page on your very own
server.

It wouldn't be a bad idea to set up an ftp server as well in order to
more easily upload web pages and scripts to the Apache server.
I don't think I will. One of the headaches that I've bought myself with
install is the need to teach myself about website security, so that people
don't hack me. I really don't have the time for that, so for now, my plan
is to just keep the server turned off when I'm not programming and testing
pages and scripts.

Since I started this, teaching myself about security has now officially
arrived on my list of priorities, but I need to teach myself about so many
different aspects of web programming that my list of priorities is getting
pretty long by now.

I really need to get back to EJB and XML, which is where this all started.
Fortunately I'm a quick study, but there's a *lot* to learn. But at least
now I know what a lot of those phrases mean that I used to hear back in the
nineties.

Reply With Quote
  #19  
Old   
Aardvark
 
Posts: n/a

Default Re: Will this work? - 08-02-2009 , 09:13 PM



On Mon, 03 Aug 2009 01:08:35 +0000, Bluuuuuue Rajah wrote:

Quote:
Once again, spot on.

Download, double-click and install. During the install you'll be asked
to enter a few elementary configurations, but once it's done, you
should be able to ...

Thanks. I'll walk through the setup and see if there's anything I don't
understand. When the .msi file unpackages itself, will I find a
document in there telling me how to decide on the various choices I'll
be asked to make?

Once the Apache server is installed you'll find basic documents within the
server directory on your hard drive. As I recall that'll be 'C:\Program
Files\Apache2'. Or something similar. There is plenty online to instruct
you in the configuration and running of Apache on your machine.

You *will* be asked during the install if you want the server to run as a
service. That means 'Do you want your server to automatically start when
you boot up?'. That's up to you.

Quote:
Also, how do I test that it's working, once the install is done? I
don't want to test it by writing a page that asks the server to send
"Hello World" when I click "Submit," because I've never done that before
either, so I have to test the two separately. You can't test two things
that you've never done at the same time, because when it doesn't work,
you don't know which stage is broken.

Read this next line:

Quote:
fire your Apache up, point your browser to 127.0.0.1

How come you guys keep mentioning 127.0.0.1? Is that address special in
some way?

Local loopback IP address. if you're running a server on your local
machine, that's the IP address of your machine. That or 'localhost', which
resolves to 127.0.0.1

Quote:
and hey presto, there's the default index page on your very own server.

It wouldn't be a bad idea to set up an ftp server as well in order to
more easily upload web pages and scripts to the Apache server.

I don't think I will. One of the headaches that I've bought myself with
install is the need to teach myself about website security, so that
people don't hack me. I really don't have the time for that, so for
now, my plan is to just keep the server turned off when I'm not
programming a
Okey-doke. It's your machine and you decide what to do on it.

Reply With Quote
  #20  
Old   
Scott Bryce
 
Posts: n/a

Default Re: Will this work? - 08-02-2009 , 11:30 PM



Aardvark wrote:
Quote:
On Sun, 02 Aug 2009 15:51:47 -0600, Scott Bryce wrote:
All he has to do is set up an alias and/or script alias in the
config file.


Or keep his document root folder open while he's working on pages and
scripts. More than one way to skin a cat.

I place the directory that contains the local version of my site where
it is convenient for me to find it when I'm working without the web
server running. Then I set up an alias and script alias to the cgi-bin.
It just depends on how you like to work. Most of the work I do on my
site is done with the server off. I only use the server for a final
check before I upload files.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.