Lunarpages Web Hosting Forum

Author Topic: Problems with forms, pls help !  (Read 6760 times)

Offline flavor76

  • Pong! (the videogame) Master
  • *****
  • Posts: 23
Problems with forms, pls help !
« on: October 27, 2004, 08:37:14 AM »
Hi,

My forms on my website was working until formmail was not allowed on lunarpages due to spamming concerns.

My web-designer has left the company and i'm left with forms that is not working.

My script:
<form action="http://www.aycez.com/cgi-bin/FormMail.cgi" method="POST" onSubmit="return CheckMsgFrm(this);">
<input type="hidden" name="recipient" value="sales.enquiry@aycez.com">
<input type="hidden" name="subject" value="Enquiry/Biz Opportunity">
<input type="hidden" name="redirect" value="http://www.aycez.com/thankyou.html">

I'm not familiar with scripts. Dunno wat to do......

Can anyone help ?

Thanx.

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #1 on: October 27, 2004, 08:42:01 AM »
Hi there,

First of all you shlould look and tell us what cgi you are running to do the job.
If it is NMS formmail or TFMail it should be okay. Althought you *will* have to change it's name as LP doesn't allow running scripts with the words form nor mail in their name.
You can find this info by downloading the cgi script that is named FormMail here and editing it in a text-only editor.

Once this done, you may have to change the script to switch to one I mentionned above. I can walk you through if you want.
Have a look and carefully read this post, it may help  :thumb:
http://www.lunarforums.com/forum/viewtopic.php?t=20913

EDIT : BTW, Welcome to LunarForums  :yey:
Luck is my middle name. Mind you, my first name is Bad.

Offline flavor76

  • Pong! (the videogame) Master
  • *****
  • Posts: 23
Problems with forms, pls help !
« Reply #2 on: October 27, 2004, 08:55:50 AM »
have downloaded the compact formmail and renamed to aycez.pl

wat should i do next ?

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #3 on: October 27, 2004, 09:08:58 AM »
With a text only editor, open the newly baptized aycez.pl

Quote

From the how-to :
2) Make sure that your changes to the following configs (located at the beginning part of the script) look like this:
Code:
$mailprog = '/usr/sbin/sendmail -oi -t';
Code:
$postmaster = 'user@yourdomain.com';
Code:
@referers = qw(yourdomain.com localhost);
Code:
@allow_mail_to = qw(user@yourdomain.com localhost);
Code:
From: user@yourdomain.com


* NOTE: "yourdomain.com" and "user" should be replaced with whatever your domain name and email addy would be.

 

Now, make sure you don't erase a ; sign at the end of the lines, nor the qw thing

in other words, the only things you need to change by now are yourdomain.com and user@yourdomain.com to suit your case.

once done, quickly double check no ; nor ( ) misses and save back the file.
At that point you can upload it to your cgi-bin folder in ascii mode and make sure to chage the chmod to 755 with your ftp client.

just let me know, well shall then have a look at the contact form..
Luck is my middle name. Mind you, my first name is Bad.

Offline flavor76

  • Pong! (the videogame) Master
  • *****
  • Posts: 23
Problems with forms, pls help !
« Reply #4 on: October 27, 2004, 09:11:03 AM »
hi,

the .pl file contains lots of texts....

sorri...i really not familiar with this stuff....think you got to walk with me on this

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #5 on: October 27, 2004, 09:18:19 AM »
No problem, I guess that's why I hang aroung here  :wink:

however, regarding your script, there is a lot of text indeed  :P
but the part that is important to us right now is just after the line which states :
Quote
# USER CONFIGURATION SECTION

this is around line 31.
You ust have to read around that part and make the chages i mentioned above, making sure you do replace user@yourdomain.com by the email address you use for receiving those messages, and of course, yourdomain.com with your domin's name.

Let me know if you are really lost  :thumb:
Luck is my middle name. Mind you, my first name is Bad.

Offline flavor76

  • Pong! (the videogame) Master
  • *****
  • Posts: 23
Problems with forms, pls help !
« Reply #6 on: October 27, 2004, 09:25:33 AM »
okie let me disgest a bit....and read them......

okie....now my texts looks like this:
# USER CONFIGURATION SECTION
$mailprog = '/usr/sbin/sendmail -oi -t';
$postmaster = 'sales.enquuiry@aycez.com@aycez.com';
@referers = qw(aycez.com localhost);
@allow_mail_to = qw(sales.enquiry@aycez.com localhost);
From: sales.enquiry@aycez.com

Is this correct ?

Offline flavor76

  • Pong! (the videogame) Master
  • *****
  • Posts: 23
Problems with forms, pls help !
« Reply #7 on: October 27, 2004, 09:30:34 AM »
sorri....

should be:

# USER CUSTOMISATION SECTION

$mailprog = '/usr/sbin/sendmail -oi -t';
$postmaster = 'sales.enquiry@aycez.com';
@referers = qw(aycez.com localhost);
@allow_mail_to = qw(sales.enquiry@aycez.com localhost);
From: sales.enquiry@aycez.com

# USER CUSTOMISATION << END >>

wat is next then ? thanx....

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #8 on: October 27, 2004, 09:33:33 AM »
Quote

$postmaster = 'sales.enquuiry@aycez.com@aycez.com';

Should look like this :
Quote

$postmaster = 'sales.enquuiry@aycez.com';


Otherwise it is correct.
now upload this pl file to your cgi-cin directory with an FTP client, and while you're there, just delete the old 'FormMail.pl' file.
Do not forget to change the chmod of the aycez.pl file to 755

Then we'll have a look to your form file. Can you please give the adress so I can take a look at your submission form, i'll get the changes you'll have to do so I can tell you :wink:
Luck is my middle name. Mind you, my first name is Bad.

Offline flavor76

  • Pong! (the videogame) Master
  • *****
  • Posts: 23
Problems with forms, pls help !
« Reply #9 on: October 27, 2004, 09:36:29 AM »
sorri......

how do i change the chmod to 755 when i upload

i'm using ftp commander.....

address is aycez.com/contactus.html

thanx......

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #10 on: October 27, 2004, 09:43:53 AM »
Errr... i actually dont know FTP commander that well so I won't be able to help...
But that won't stop us  :wink:  I have a workaround ! 8-)
Go to your cPanel and choose File Manager. Browse to your aycez.pl file by clicking the folder icon next to www then next to cgi-bin. your file shoulb be there.
Clicking on that file will make it appear on the upper right side of the window and you'll get the 'Change Permissions' command. Give it a shot !
You'll see a little table where you can enter the 7 5 5 pattern and click on change to get it done.
Won't be stuck that easy :poke:

Meanwhile, i'll be looking at your form  :wink:
Luck is my middle name. Mind you, my first name is Bad.

Offline flavor76

  • Pong! (the videogame) Master
  • *****
  • Posts: 23
Problems with forms, pls help !
« Reply #11 on: October 27, 2004, 09:51:27 AM »
done!

thanx....change the permission to 755...

wat's next ? i'm getting excited now....

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #12 on: October 27, 2004, 09:55:17 AM »
DAMN ! this is one of a form you have here !
can you provide me some details about how all those fiels were sent tou you ? I mean how did they appear in the mail ?
Were there something like :
Quote
Mr firstName LastName
Job title :
Department :
Direct phone :
...
Message : etc...


if so i'll have to make some changes inside the pl file foe it to handle all those informations.. Please, just tell me that this is how the informations are transmitted  :-?
Luck is my middle name. Mind you, my first name is Bad.

Offline flavor76

  • Pong! (the videogame) Master
  • *****
  • Posts: 23
Problems with forms, pls help !
« Reply #13 on: October 27, 2004, 09:59:53 AM »
honestly.....this is done by my ex-designer who have since left the company....

but when it was working......i received via email in the format:
Firstname:
Lastname:
JobTitle:
etc.......

like the ones you mentioned.....

so can this be done ? thanx.........

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #14 on: October 27, 2004, 10:06:25 AM »
Okay, i assume you don't mind some minor changes in the layout of the info you receive ?

If it possible... however, i'll have to make some changes into the script so it can take all that bunch of informations and make something with it  :wink:
We may have some minors modifications to make to the form then... but nearly nothing.

If you leave me a few moments, i'll try and modify the script for you... hou'll have to redownload it from my place and replace the one we uploaded a few moments ago, then a little 755 chmoding, and if all goes well, it should be okay  :thumb:

Sorry for the delay.  :? Didn't realized that your form could be so 'complicated'.

But i won't give up...I'm getting to it now, i'll let you know when i'm okay with it.
Luck is my middle name. Mind you, my first name is Bad.