Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Contact Form woes!

Options
  • 05-10-2006 11:45am
    #1
    Registered Users Posts: 125 ✭✭


    Hi there,
    Just wondering if any PERL head wants to give the contact form script on my site a once over. Eircom have said that there are compile errors with it, and so can't "activate it".

    The file is here: http://www.evolutioncontracting.ie/sandbox/form2email.pl

    Has anyone much experience in contact form usage? I thought i was doing everything right until this little hickup.

    Any help would be great!

    -dan


Comments

  • Registered Users Posts: 125 ✭✭dan99989


    Somebody must have a bit of experience with these...

    *help* :)


  • Closed Accounts Posts: 39 Arch-Stanton


    Is your hosting platform Linux or Windows ?

    The script is calling #!/usr/bin/perl so I assume it's Linux

    First check with your hosting provider the location of the Perl interperter, #!/usr/bin/perl is usuall however sometimes it's #!/usr/bin/local/perl

    Second make sure that up uploaded your script in ASCII format and that the permissions are set to 755


    .


  • Registered Users Posts: 125 ✭✭dan99989


    The platform is indeed Linux, and i'll go check the location of the interpreter. Eircom are the guys who control CHmodding on business packages so i can't touch that part until they've validated the perl script - a pain i know.

    Below is a transcript of what an Eircom tech said to me:

    With regard to the FTP upload, many files/scripts created or edited using a Windows operating system will insert ^M characters at the end of each line which remain in the file when transferred using ASCII. This is avoided by using 'BIN' in your ftp client and not ASCII. ASCII is not required when uploading to our servers in order for the OS to recognise the file as an executable as we will manually set the file permissions to 755 (and the OS shell will correctly run the script using Perl due to the #!/usr/bin/perl in the first line of the script).

    The following is an example from form2email.pl:
    #!/usr/bin/perl^M
    ##################################################################################^M
    # Form2Email.net 21/October/2005^M
    # © 1999-2005 Form2Email.net^M

    There is also an error with form2email.pl.
    perl -wc form2email.pl
    Can't declare postincrement in my at form2email.pl line 378, near "++;"
    form2email.pl had compilation errors.

    If you could please fix the above errors, add 'use strict' to both scripts and upload both files again in BIN mode, we shall test the scripts and set permissions once they run correctly.


    Any idea on the error?

    Thanks for your feedback by the way


  • Closed Accounts Posts: 80 ✭✭realblackstuff


    Using an ASCII editor, such as EditPadPro you can 'strip' your text of all these ^M characters, resp. convert the text to the format you require.
    Notepad is too basic and using e.g. Word with 'save as xxx.txt' is dodgy.
    HTH


  • Closed Accounts Posts: 70 ✭✭vito


    Try notepad++ from sourceforge.net - free and does the job very nicely.


  • Advertisement
Advertisement