474,042 Members | 11,491 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Apache question

joe
I am learning Javascript by running Apache on my computer. The following question
does not have Javascript because I've stripped it from a larger project.

I have the following simple index.html:

<html>
<p>Test</p>
<p>
<form action="http://127.0.0.1/test.pl" method="POST">
<input type="text" name="textfield " value="Hi!">
<input type="submit" name="Submit" value="Submit">
</form>
</html>

and the test.pl Perl file is even simpler:

#!/usr/bin/perl
open COLOURS, ">colours.t xt";
print COLOURS "My favourite colour is blue\n";
close COLOURS;

When I open the IE and go to http://127.0.0.1 I get the test form above. But
when I press the Submit button I get Save/Open dialog instead of colours.txt
being created.

I have set up a Perl interpreter. When I run "perl test.pl" from DOS command
prompt I get what I expect.

What gives?
Jun 9 '06 #1
2 1223
joe schreef:
I have set up a Perl interpreter. When I run "perl test.pl" from DOS command
prompt I get what I expect.


You will also have to add a Perl script handler to the httpd.conf for
the script to be correclty interpreted.

You should consult the web or one of the many Apache-related newsgroups
for further guidance, as this problem has nothing to do with JavaScript.
JW
Jun 9 '06 #2
joe wrote:
I am learning Javascript by running Apache on my computer. The following question
does not have Javascript because I've stripped it from a larger project.


Okay... so you are learning javascript from an example that contains no
javascript? And then you ask in a javascript group why your example
devoid of any javascript does not do what you want? Does that not sound
silly to you?

I have no knowledge of Perl or of the Apache webserver, but if I would
have to take a guess it is that an incorrect mime-type is returned for
the text file in your http header.

This answer did not contain any javascript either...

Robert.
Jun 9 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2825
by: DrWizard | last post by:
Hi I been first times setup. So Who have experience the Win98 + Apache + php (not run PWS or IIS) I begin download and installed the Apache. I test the run is working on browser (http://localhost) show the apache page. But Apache Console Running under the DOS Window say :- =====================================
3
2474
by: Ron King | last post by:
When I installed Mandrake 10.0 I thought I had Apache, PHP, and MySQL installed correctly. I could serve web pages, MySQL worked, and when I tried the phpinfo() function, I got a page that looked OK. I could create simple php pages and serve them up. Then I tried to install pear, and things started to be not OK after all. phpinfo() told me that the 'Configure Command' had both the following in it: --with-pear=/usr/share/pear
1
2059
by: New to PHP | last post by:
I am able to install Apache in my XP home edition. I did put a very simple index.html /apache/htdocs/index.html and when I type in http://localhost/index.html, I get this error : Not Found. Please tell me where should I put the index.html? Thanks. PS. I did not change httpd.conf and here is part of it
3
1828
by: New to PHP | last post by:
I have 3 computers with Ethernet connection to a local router box(SMC7008ABR) and on the wan side to Verizion DSL. I was able to install Apache and PHP on one of the PC with XP Home edition. How much risk from being attacked? I set up SMC7008ABR to allow only public port 80. The reason I am sking becuase Verizon is no longer give me a fix IP address anymore since I saw the LED lights of the DSL box and SMC keep flashing non-stop. ...
5
9059
by: humbads | last post by:
How can I trigger the default Apache 404 error from PHP? I don't want to specify a custom handler, I want the default handler. The reason is that I am using mod_rewrite with Apache for my site. If certain a certain page is requested that is not published, then I want to send the apache default 404 error page. Currently, I am doing this to return a custom error. if($pageNotPublished) { header("HTTP/1.1 404 Not Found"); // How do I...
2
2122
by: TrashOverride | last post by:
Hello guys i have a question about apache... i have installed Apache 2.0.54 PHP 5 MySQL 4.01 and i was wondering if i could use a name to access my apache server -> not to use http://localhost but to use example1.com? i have tried to adjust the vhost section acording to the guide in the apache web page, but when i try i get error 404. also when i try http://localhost i also get 404. i've attached my .conf file. i want to access my server...
0
2041
by: bruce | last post by:
Hi... Update.... We have the following setup in our httpd.conf file. We've tried to give what's related to the issue. We're trying to set up a virtual host for a test project. The behavior that we're seeing is that we can type: http://foo.com but the url that gets displayed is
1
1422
by: Sam Carleton | last post by:
Is it possible to have apache host an asp.net app on a windows server? If so, how? Sam
6
8007
by: MaiyaHolliday | last post by:
Hello, I've recently installed apache on a new computer, and cannot figure out why my site will not process any includes. (it was working on my old one) There are no errors on the page such as "include not found", rather much of the page is blank where the included menus, etc would be, and the CSS is not attached. thanks so much!!! My httpd.conf looks like this:
2
2763
by: paulysa | last post by:
Hi there. I am experimenting with Apache/MySQL/PHP to set up a contact list. Background Am a bit of a dabbler. Downloaded MySQL 5.0.67 for windows and Apache 2.2.9 with OpenSSL-0.9.8h-r2 and PHP 5.2.6 to experiment on my PC with WinXP with SP2 before perhaps trying a Linux server system. Full install of MySQL and Apache both work separately. But a full install of PHP failed. Now I wish to uninstall PHP and try a default PHP install but...
0
10536
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
12131
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11599
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
11137
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10304
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6827
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3964
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.