View Full Version : Error Messsage for Formmail.php
dparker2
27-May-2004, 12:39 PM
Hi
I am fairly new & inexperienced in all things PHP which is why I have been looking around for free scripts that I can upload to my ISP and hence use formmail etc. After downloading 2 other scripts and getting 'Parse error on line xxx' all the time, I though 4rd time lucky and came to the Tectite script.
For testing purposes, I changed the only line that it instructed me to in order for the thing to work. We have a domain name of www.dog-tooth.com (http://www.dog-tooth.com) hosted by ukhosts.com. I changed the TARGET_EMAIL field to be 'dog-tooth.com', but all I get is a message about an error and that someone has been informed ????
The test file is on www.dog-tooth.com/formmail3test.html (http://www.dog-tooth.com/formmail3test.html)
I may have fed the wrong info into the field above, I am not sure. Should this field relate to the actual ISP's server name rather than our domain name ??
Any help would be appreciated.
Thanks
David
dparker2
27-May-2004, 12:40 PM
Sorry, I forgot to say, the ISP passed the mailtest.php & phpinfo.php tests without any problems.
Thanks
David
russellr
27-May-2004, 09:11 PM
Something looks quite broken. When I submitted your form I got:
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /home/domain/www.dog-tooth.com/web/cgi-bin/formmail3.php on line 1994
Inside your form, you've got the recipients set to '....easynet.co.uk'. This means your setting of TARGET_EMAIL field to be 'dog-tooth.com' won't work.
We also strongly recommend you set DEF_ALERT so that you get error messages sent to you. However, the above "parse error" needs to be resolved before you get anywhere.
What version of PHP do you have installed? (phpinfo tells you that).
If you'd like to send me your configured formmail.php to custsupp AT tectite DOT com, I'll see what I can do to help.
dparker2
28-May-2004, 07:14 AM
Hi
Thanks for what you've done so far, when I get back home I'll send the formmail.php through, for now, the www.dog-tooth/com/cgi-bin/phpinfo.php (http://www.dog-tooth/com/cgi-bin/phpinfo.php) file is still there so maybe you could have a look at the version number, most of that screen is a foreign language to me
Thanks
David
russellr
28-May-2004, 07:22 AM
It's version 4.1.2 of PHP. That's pretty old, but it should work OK.
I look forward to receiving you formmail.php file. :)
dparker2
28-May-2004, 12:08 PM
Hi,
I have attached the PHP for you to have a look at. I have only changed DEF_ALERT & TARGET_EMAIL to the best of my knowledge.
Many Thanks
David
russellr
28-May-2004, 09:15 PM
Hi David,
Lots of things have been changed by whatever you used to edit it. The script is quite broken.
Please download it again and set TARGET_EMAIL and DEF_ALERT using notepad or other simple editor.
Upload it with FTP (or WinSCP) and you should be fine.
Post again if you need any further assistance. :)
dparker2
01-Jun-2004, 07:13 AM
Hi
Thanks for your help, I have done as you suggested and everything works fine. I did indeed make some alterations in Frontpage (and Dreamweaver) by amending the HTML section and then just doing a SAVE. Obviously that can't be done with scripts I take it.
One other thing, if we put a required field name of 'email' in and the person doesnt fill 'email' in, then we get a simple test message saying about this. Can we get these situations to go to the 'bad_url' field that we have put in for failed processing, at the moment it doesnt.
Thanks
David
russellr
01-Jun-2004, 08:09 AM
Hi David,
One other thing, if we put a required field name of 'email' in and the person doesnt fill 'email' in, then we get a simple test message saying about this. Can we get these situations to go to the 'bad_url' field that we have put in for failed processing, at the moment it doesnt.
If "email" is a required field and it's not specified by the user, FormMail will redirect to the "bad_url".
If it's not doing that, then something must have got broken again.
Powered by vBulletin® Version 4.1.4 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.