Webhosting Perl and CGI Scripts: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
Make a bit more generic, with Perl as an option |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| ⚫ | |||
[[File:Couk.png|link=:Category:Webhosting]] |
|||
Simple shell scripts can start with #!/bin/sh, #!/bin/bash, or (if you must) #!/bin/csh (but see [https://www-uxsup.csx.cam.ac.uk/misc/csh.html why you should not]) |
|||
| ⚫ | |||
For |
For Perl, the script should start with #!/usr/bin/perl |
||
Python is not available. |
|||
| ⚫ | |||
| ⚫ | |||
Within the script, the mail program used for sending mail is /usr/lib/sendmail . You should not use this with the -t argument (which find the From and To in the email) but use -f 'from-email-address' 'to-email-address' in place of the -t argument. |
Within the script, the mail program used for sending mail is /usr/lib/sendmail . You should not use this with the -t argument (which find the From and To in the email) but use -f 'from-email-address' 'to-email-address' in place of the -t argument. |
||
A simple mailer is available - [[ |
A simple mailer is available - [[Webhosting Form Mailer]] |
||
There are various |
There are various Perl scripts available on the internet, and many books on the subject. You do not have access to php or mysql on the server, and you may have to change the use of sendmail as above. |
||
==Environment Variables == |
==Environment Variables == |
||
| Line 55: | Line 57: | ||
|- |
|- |
||
| HTTP_REFERER |
| HTTP_REFERER |
||
| |
| Referrer: header contents The page this link came from |
||
|- |
|- |
||
| REMOTE_USER |
| REMOTE_USER |
||
| Line 72: | Line 74: | ||
==Other Webhosting pages |
==Other Webhosting pages== |
||
<ncl style=bullet maxdepth=5 headings=bullet headstart=2 showcats=1 showarts=1>Category:Webhosting</ncl> |
<ncl style=bullet maxdepth=5 headings=bullet headstart=2 showcats=1 showarts=1>Category:Webhosting</ncl> |
||
| Line 78: | Line 80: | ||
[[Category:Webhosting]] |
[[Category:Webhosting|Perl]] |
||
[[Category:Domains]] |
|||