Formmail.pl ......... Tried everything, doesnt work.

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Formmail.pl ......... Tried everything, doesnt work.

Postby Form_man » 23. June 2006 19:29

Hey guys,

Ive recently installed Xampp on my windows xp machine. I wanted to setup a formmail for my school project. Problem is, I cant get it to work. I don't know how to make CGI work on xampp.

Here is the steps Ive taken so far.

I went to h**p://www.scriptarchive.com/download.cgi?s=formmail

I downloaded their formmail script, its in perl. I put it in my CGI bin directory.

I edit my index.html file and in the beginning I added this:

<form action="http://69.158.165.172/xampp/cgi-bin/fm192.pl" method="POST">
<input type="hidden" name="recipient" value="1">
<input type="hidden" name="redirect" value="http://69.158.165.172/xampp/Test/SchoolProject.htm">
<input type="hidden" name="missing_fields_redirect" value="http://69.158.165.172/xampp/Test/">


My ip is not the same anymore as it changes every now and then, but thats not the problem.

I run the index.html, i fill out the form and the error says:


Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

Error 404
69.158.165.172
06/23/06 14:27:59
Apache/2.2.2 (Win32) DAV/2 mod_ssl/2.2.2 OpenSSL/0.9.8b mod_autoindex_color PHP/5.1.4


Anyone have a clue on how to use the form mail function with xampp?
Form_man
 
Posts: 10
Joined: 23. June 2006 18:39

Postby Form_man » 23. June 2006 19:34

Not to mention, I even edited the formmail script to it send to my email address. But if anyone can give me a moddifed version that works with xampp please help.

I looked at these forums for the sendmail option and also changed those settings as well, still nothing.
Form_man
 
Posts: 10
Joined: 23. June 2006 18:39

Postby Wiedmann » 23. June 2006 20:13

I put it in my CGI bin directory.

Your mean "\xampp\cgi-bin"?

<form action="http://69.158.165.172/xampp/cgi-bin/fm192.pl" method="POST">

If yes, this must be:
Code: Select all
<form action="http://69.158.165.172/cgi-bin/fm192.pl" method="POST">
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Form_man » 23. June 2006 20:23

I tried what you said to do, then it gave me a whole new error. This is the new error:

Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.

Error 500
69.158.165.172
06/23/06 15:19:58
Apache/2.2.2 (Win32) DAV/2 mod_ssl/2.2.2 OpenSSL/0.9.8b mod_autoindex_color PHP/5.1.4



What should I do now? Do you want to see the fm192.pl file? I can show it to you.
Form_man
 
Posts: 10
Joined: 23. June 2006 18:39

Check this link for the .pl file... maybe an error?

Postby Form_man » 23. June 2006 20:31

Check this:

this is the fm192.pl file I'm using.


h**p://70.48.35.204/xampp/fm192.pl


I just copied the cgi-bin file to this folder so you can take a look at it. I replaced the emails to my email. Please help. I cant find any information on the net for it.
Form_man
 
Posts: 10
Joined: 23. June 2006 18:39

Postby Wiedmann » 23. June 2006 20:35

Error 500

Look in your "error.log" for a detailed error message.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Check my site: h**p://70.48.35.204/xampp/test/login.html

Postby Form_man » 23. June 2006 20:38

This is what it says:

[Fri Jun 23 15:19:32 2006] [notice] Server built: May 9 2006 14:08:48
[Fri Jun 23 15:19:32 2006] [notice] Parent: Created child process 4904
[Fri Jun 23 15:19:34 2006] [notice] Child 4904: Child process is running
[Fri Jun 23 15:19:34 2006] [notice] Child 4904: Acquired the start mutex.
[Fri Jun 23 15:19:34 2006] [notice] Child 4904: Starting 250 worker threads.
[Fri Jun 23 15:19:34 2006] [notice] Child 4904: Starting thread to listen on port 443.
[Fri Jun 23 15:19:34 2006] [notice] Child 4904: Starting thread to listen on port 80.
[Fri Jun 23 15:19:49 2006] [error] [client 192.168.1.1] File does not exist: C:/Program Files/xampp/htdocs/xampp/Test/hide.htm, referer: http://70.48.35.204/xampp/test/sysdll.php
[Fri Jun 23 15:19:49 2006] [error] [client 192.168.1.1] File does not exist: C:/Program Files/xampp/htdocs/en_US, referer: http://70.48.35.204/xampp/test/login.html
[Fri Jun 23 15:19:51 2006] [error] [client 192.168.1.1] File does not exist: C:/Program Files/xampp/htdocs/xampp/Test/pdownclick.gif, referer: http://70.48.35.204/xampp/test/sysdll.php
[Fri Jun 23 15:19:58 2006] [error] [client 192.168.1.1] C:/Program Files/xampp/cgi-bin/fm192.pl is not executable; ensure interpreted scripts have "#!" first line, referer: http://70.48.35.204/xampp/test/login.html
[Fri Jun 23 15:19:58 2006] [error] [client 192.168.1.1] (9)Bad file descriptor: don't know how to spawn child process: C:/Program Files/xampp/cgi-bin/fm192.pl, referer: http://70.48.35.204/xampp/test/login.html
[Fri Jun 23 15:25:15 2006] [error] [client 192.168.1.1] File does not exist: C:/Program Files/xampp/htdocs/xampp/Test/hide.htm, referer: http://70.48.35.204/xampp/test/sysdll.php
[Fri Jun 23 15:25:16 2006] [error] [client 192.168.1.1] File does not exist: C:/Program Files/xampp/htdocs/en_US, referer: http://70.48.35.204/xampp/test/login.html
[Fri Jun 23 15:25:17 2006] [error] [client 192.168.1.1] File does not exist: C:/Program Files/xampp/htdocs/xampp/Test/pdownclick.gif, referer: http://70.48.35.204/xampp/test/sysdll.php
[Fri Jun 23 15:25:22 2006] [error] [client 192.168.1.1] C:/Program Files/xampp/cgi-bin/fm192.pl is not executable; ensure interpreted scripts have "#!" first line, referer: http://70.48.35.204/xampp/test/login.html
[Fri Jun 23 15:25:22 2006] [error] [client 192.168.1.1] (9)Bad file descriptor: don't know how to spawn child process: C:/Program Files/xampp/cgi-bin/fm192.pl, referer: http://70.48.35.204/xampp/test/login.html
[Fri Jun 23 15:25:31 2006] [error] [client 192.168.1.1] File does not exist: C:/Program Files/xampp/htdocs/xampp/Test/go1roll.gif, referer: http://70.48.35.204/xampp/test/sysdll.php
Last edited by Form_man on 23. June 2006 20:45, edited 1 time in total.
Form_man
 
Posts: 10
Joined: 23. June 2006 18:39

Postby Wiedmann » 23. June 2006 20:44

[Fri Jun 23 15:19:58 2006] [error] [client 192.168.1.1] C:/Program Files/xampp/cgi-bin/fm192.pl is not executable; ensure interpreted scripts have "#!" first line, referer: http://70.48.35.204/xampp/test/login.html

The first line of a perl script, named "shebang", must point to your perl interpreter.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Form_man » 23. June 2006 20:46

Can you explain what that means? I don't know many of the terms you are saying.

What about this file:

h**p://70.48.35.204/xampp/FormMail.pl

Its another version of formmail. How can i rededit it to it works to my email? (I could rename the file to fm192.pl, only when the code is suitable)
Form_man
 
Posts: 10
Joined: 23. June 2006 18:39

Do it simple:

Postby chanio » 23. June 2006 21:01



:lol: Hi!
You must know some 'trics' to handle it all out without trouble. Don't worry, you'll learn them...

You must be aware of the names to which you always refer to your server:
* When you read-say: root you mean the physical place where your server resides... (C:\XAMPP\)
* The Document Root should refer to where your pages are (C:\XAMPP\htdocs\)

* At the html pages you can refer to the document root as http://localhost/ (try it) or your ever changing IP address (you should look at http://dyndns.org/ for another fantasy name to use). Or you can refer to / (just a slash) to refer to your document root location.
* Logically, every directory that starts at your document root or at your root (if you declared in Apache how to see it) could be written just starting with / for example: Try this from your browser (in the same computer where you are running Apache) write the following at your browser's address bar: /xampp/Test/.
* Is it working? If not, then you should do well the physical to virtual translation of addresses (follow what I have previously exposed).

If you are not sure if your formail.pl is working fine, you could try it from the command line:
(type:) cmd
Then, go to the script's directory and call it:
perl formail.pl
and see what happens. If perl is not understood, you should mention the complete physical path to perl.exe (C:\xampp\perl\bin\perl.exe) . Another help could be to test your formail.pl:
perl -c formail.pl
formail.pl syntax OK (did it answer this?)

Check that your first line at the script says something like:
#!C:\xampp\perl\bin\perl.exe

(it is declaring again the path to where the file perl.exe resides, with all it's libraries)

There are a lot of other useful tips to handle apache scripts without any trouble. If you need them, just google .

Hope it helps!
alberto


Gallactic Firewall
User avatar
chanio
 
Posts: 72
Joined: 18. March 2003 22:05
Location: Argentina

Postby Form_man » 23. June 2006 21:21

Ok let me try it
Last edited by Form_man on 23. June 2006 21:33, edited 1 time in total.
Form_man
 
Posts: 10
Joined: 23. June 2006 18:39

Re Update

Postby Form_man » 23. June 2006 21:32

UpDate

Well I did exactly what you said. And even added the line you asked me to add in the beginning of the formmail script.

Perl couldnt find the formmail.pl so I put the .pl file in the perl folder, i did all the commands and it said Syntax OK.

This is the error I get:

There was no recipient or an invalid recipient specified in the data sent to FormMail. Please make sure you have filled in the recipient form field with an e-mail address that has been configured in @recipients. More information on filling in recipient form fields and variables can be found in the README file.

--------------------------------------------------------------------------------

FormMail V1.92 © 1995 - 2002 Matt Wright
A Free Product of Matt's Script Archive, Inc.


What should I do now?

I made a copy of my formmail.pl file.

Please take a look and see what errors there are:

h**p://70.48.35.204/xampp/formmail.pl
Form_man
 
Posts: 10
Joined: 23. June 2006 18:39

Another update

Postby Form_man » 23. June 2006 21:50

So far, i tried some stuff, i fixed my html file and put my email address in the receipt section.

Now... when i test it. h**p://70.48.35.204/xampp/test/

It works without errors. Only major problem... it doesnt send the mail. Now what? Please check the bottom link and see if anyone can figure out a solution.


h**p://70.48.35.204/xampp/formmail.pl
Form_man
 
Posts: 10
Joined: 23. June 2006 18:39

Can someone help?

Postby Form_man » 24. June 2006 03:26

Anyone have any ideas on how to help me solve this problem?
Form_man
 
Posts: 10
Joined: 23. June 2006 18:39


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 163 guests