Results 1 to 9 of 9

Thread: CGI Forms??

  1. #1

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765

    CGI Forms??

    Well I asked this a while back I think... but that was just for a form layout...

    But the new question is does anyone have an emailer script that isn't in total jibberish? I tried the one from Matts Script Archieve, but I can't seem to get it working.

    I'm hosted at http://www.free.prohosting.com

    It supposedly allows CGI hosting.

    Thanks in Advance.
    Don't Rate my posts.

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Are you running the sendmail server program as well - a lot of scripts rely on that. You can directly you Perl's SMTP module if you have a SMTP server you can connect to.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    I know for a fact that the one at Matt's (formmail) isn't gibberish because I use it and it comes as standard with practically every bit of webspace

    You must check with them for things like the sendmail and perl paths so that it works correctly. Also usually perl scripts are confined to the cgi-bin directory. Make sure you've CHMOD'd it 777 (or at least 755) too

  4. #4

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765
    Well when I opened up the .cgi.. or .pl file in notepad it was just a continuous letters, with the odd square, and it wasn't exactly readable.

    But it looks like they don't allow it anyway.

    Definately disappointing.
    Don't Rate my posts.

  5. #5
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    I have that problem a lot with ascii files, loads of scripts I download turn to long lines with boxes when viewed in Notepad. They of course don't work for toffee when uploaded.

    I solve it by copy/pasting it all into Word which correctly formats it, then copy paste it back into notepad and save the file

    It should work fine after that

  6. #6
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Originally posted by chrisjk
    I have that problem a lot with ascii files, loads of scripts I download turn to long lines with boxes when viewed in Notepad. They of course don't work for toffee when uploaded.

    I solve it by copy/pasting it all into Word which correctly formats it, then copy paste it back into notepad and save the file

    It should work fine after that
    WS_FTP can transfer files in ASCII mode instead of binary, so the line breaks stay correct for the respective OS.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  7. #7
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    Originally posted by JoshT
    WS_FTP can transfer files in ASCII mode instead of binary, so the line breaks stay correct for the respective OS.
    Normally I just use IE to dowload things like formmail.pl. I think Win2000 is doing it because it doesn't happen on an Win98 box. The file is forever messed up after downloading it, until it's "fixed" using the Word copy/paste method

    Strangly enough, viewing the file in some other text editors it displays correctly, but the file is still screwed as it won't parse properly

    I had a hell of a time fixing phpmyadmin I can tell you

  8. #8
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    It's because Unix uses "\n" as the line break for a text file, while Windows uses "\r\n" for text files. I think Apple might have even used just "\r", but Mac is *nix now anyway.

    So even if a text editor handles this automatically, if you upload a text file with Windows line breaks to a Unix based server, the parser doesn't necessarily know what to do with the extra "\r".
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  9. #9
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    I mean before uploading...take phpmyadmin for example. Downloaded 2.6, unzipped it...this is what it looks like in Notepad straight after download over HTTP using simple hyperlink in IE



    Now, that just isn't right. If I leave it like that and upload it to the unix server, it breaks. If i try and parse it through PHP on this machine, it breaks. I have to manually format those line breaks, then it works in both cases.
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width