You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by David Wilson <da...@attbi.com> on 2003/05/30 00:51:19 UTC

[users@httpd] file::// question

I am working with Apache and IE6 on WinXP. 

I have an HTML file with an embedded form that invokes a CGI script.
If I access this file via the browser address

http://localhost/file.htm

submitting the form properly invokes the CGI script and displays the
result in the browser window.

If instead, I use the folder window to navigate to file.htm, and click
the file.htm icon, the browser pops up with the address

c:\Program Files\Apache Group\Apache2\htdocs\file.htm

the page displays properly, but submitting the form causes the browser
window to go blank.  The address window does not change, and the
CGI script never gets invoked.

I understand that the above address gets translated to

file:///C:/Program%20Files/Apache%20Group/Apache2/htdocs/file.htm

and accessed via the FILE protocol, not the HTTP protocol, and thereby
bypasses Apache.  Is it possible/desirable to configure things so that
files in the htdocs directory get invoked with the http://localhost/ prefix?
This is just a curiosity and convenience issue for me.

I don't know if this is an Apache issue per se, since I imagine the
changes would be made to the FILE protocol config, not the Apache
server, but it seems closely related so I'm taking a chance.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] file::// question

Posted by Joseph A Nagy Jr <jo...@charter.net>.
David Wilson wrote:
> I am working with Apache and IE6 on WinXP. 
> 
> I have an HTML file with an embedded form that invokes a CGI script.
> If I access this file via the browser address
> 
> http://localhost/file.htm

Check to see you have Perl installed and properly associated with .cgi 
and .pl files.

> 
> submitting the form properly invokes the CGI script and displays the
> result in the browser window.
> 
> If instead, I use the folder window to navigate to file.htm, and click
> the file.htm icon, the browser pops up with the address
> 
> c:\Program Files\Apache Group\Apache2\htdocs\file.htm >
> the page displays properly, but submitting the form causes the browser
> window to go blank.  The address window does not change, and the
> CGI script never gets invoked.
> 
> I understand that the above address gets translated to
> 
> file:///C:/Program%20Files/Apache%20Group/Apache2/htdocs/file.htm
> 
> and accessed via the FILE protocol, not the HTTP protocol, and thereby
> bypasses Apache.  Is it possible/desirable to configure things so that
> files in the htdocs directory get invoked with the http://localhost/ prefix?
> This is just a curiosity and convenience issue for me.
> 
> I don't know if this is an Apache issue per se, since I imagine the
> changes would be made to the FILE protocol config, not the Apache
> server, but it seems closely related so I'm taking a chance.

It has nothing to do with Apache. CGI and PL files need to talk to the 
web server. When you browse just by typing in file:://C:/blah blah/ you 
are just accessing the local files as just that, files. They aren't 
anything special to the OS. That's also why .shtml files won't display 
any output from SSI when you just browse them as local files (via a file 
manager such as Windows Explorer (which is IE and IE is Windows 
Explorer, it just changes what .dll's are used when a specific protocol 
(such as FILE or HTTP) is called up), Konqueror (for KDE folks), 
Nautilus (I think for Gnome folks) and whatever Mac Heads use). IF you 
can find the config file for how Windows Explorer handles file types and 
feel comfortable editing it, I'd say go right ahead and do so. Otherwise 
if you need to test your files as they would act on a live website, 
sticking with http://localhost/fileblah.blah is your best (and really 
only) bet.

HTH


-- 
Wielder of the mighty +1 LARTsaber of Unsubscribe,
the +3 Clue-by-Four of No Attachments to a Mailing List,
and the -4 Shield of No Spell Checker


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] file::// question

Posted by Jeff Cohen <su...@gej-it.com>.
What you can do is install perl from www.activeperl.com and associate the
.cgi or .pl extensions with the perl/bin/perl.exe executable file and run it
from the command line or a browser, but again, that will run and process the
file straight from the FILE and might have some OS incompatible add-ons not
to be activated.

All the best,
Jeff Cohen
Support@GEJ-IT.com
Tel. (416) 917-2324
www.GEJ-IT.com
GEJ-IT Networks!

> -----Original Message-----
> From: David Wilson [mailto:davidwwilson@attbi.com]
> Sent: Thursday, May 29, 2003 6:51 PM
> To: Apache Users
> Subject: [users@httpd] file::// question
> 
> I am working with Apache and IE6 on WinXP.
> 
> I have an HTML file with an embedded form that invokes a CGI script.
> If I access this file via the browser address
> 
> http://localhost/file.htm
> 
> submitting the form properly invokes the CGI script and displays the
> result in the browser window.
> 
> If instead, I use the folder window to navigate to file.htm, and click
> the file.htm icon, the browser pops up with the address
> 
> c:\Program Files\Apache Group\Apache2\htdocs\file.htm
> 
> the page displays properly, but submitting the form causes the browser
> window to go blank.  The address window does not change, and the
> CGI script never gets invoked.
> 
> I understand that the above address gets translated to
> 
> file:///C:/Program%20Files/Apache%20Group/Apache2/htdocs/file.htm
> 
> and accessed via the FILE protocol, not the HTTP protocol, and thereby
> bypasses Apache.  Is it possible/desirable to configure things so that
> files in the htdocs directory get invoked with the http://localhost/
prefix?
> This is just a curiosity and convenience issue for me.
> 
> I don't know if this is an Apache issue per se, since I imagine the
> changes would be made to the FILE protocol config, not the Apache
> server, but it seems closely related so I'm taking a chance.
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org