spewn
Programmer
- May 7, 2001
- 1,034
here is the faq for cgi on hypermart's site...
**** FAQ
Where is Perl located on your server?
Perl 5.003 is located at /usr/local/bin/perl. For backwards compatibility we have perl 4 located at /usr/bin/perl. Make sure you use the right one for your script.
Do you support the cgi.pm Perl module?
Yes, we do support this.
How do I use the mail program?
The mail program is located at /var/qmail/bin/qmail-inject. You would use it the same way you use "SendMail", by piping things into it.
Where are date and other commands located?
Date is located at /bin/date
mkdir is located at /bin/mkdir
rmdir is located at /bin/rmdir
What would be the full filepath for my directory?
The fully qualified filepath for your directory would be:
/data1/hypermart.net/your_username
How would I set up permissions on my cgi-bin scripts and images/html documents?
You should NEVER set the permissions on a directory lower than 755, even if your program tells you to. Also, never chmod a file below 644. To do otherwise could possibly deny you permissions to files. If you do need to change permissions, we strongly recommend that you use the SiteManager utility located on the Members page.
The permissions for images and html documents are set up automatically for you. CGI scripts should be chmoded to 775. If a CGI script has to write to a directory, that directory should be chmoded 777 (CGI scripts run as nobody). It highly advisable that this be a separate subdirectory and the CGI output be the only thing kept in this directory.
How can I put a counter on my page?
Put the following html into your page, where you want the counter to appear. Change the "sample.dat" part to be "username.dat", where username is your HyperMart username. So if your username is "computers", you would use "computers.dat" in place of "sample.dat". If you want to use more than one counter, then add a number onto it, like "computers2.dat". The counter will start at 1, and go up from there. It will not go up if you continually reload the page yourself- this prevents "spamming."
<img src="Count.cgi?ft=0&dd=B&df=sample.dat">
**** FAQ
Where is Perl located on your server?
Perl 5.003 is located at /usr/local/bin/perl. For backwards compatibility we have perl 4 located at /usr/bin/perl. Make sure you use the right one for your script.
Do you support the cgi.pm Perl module?
Yes, we do support this.
How do I use the mail program?
The mail program is located at /var/qmail/bin/qmail-inject. You would use it the same way you use "SendMail", by piping things into it.
Where are date and other commands located?
Date is located at /bin/date
mkdir is located at /bin/mkdir
rmdir is located at /bin/rmdir
What would be the full filepath for my directory?
The fully qualified filepath for your directory would be:
/data1/hypermart.net/your_username
How would I set up permissions on my cgi-bin scripts and images/html documents?
You should NEVER set the permissions on a directory lower than 755, even if your program tells you to. Also, never chmod a file below 644. To do otherwise could possibly deny you permissions to files. If you do need to change permissions, we strongly recommend that you use the SiteManager utility located on the Members page.
The permissions for images and html documents are set up automatically for you. CGI scripts should be chmoded to 775. If a CGI script has to write to a directory, that directory should be chmoded 777 (CGI scripts run as nobody). It highly advisable that this be a separate subdirectory and the CGI output be the only thing kept in this directory.
How can I put a counter on my page?
Put the following html into your page, where you want the counter to appear. Change the "sample.dat" part to be "username.dat", where username is your HyperMart username. So if your username is "computers", you would use "computers.dat" in place of "sample.dat". If you want to use more than one counter, then add a number onto it, like "computers2.dat". The counter will start at 1, and go up from there. It will not go up if you continually reload the page yourself- this prevents "spamming."
<img src="Count.cgi?ft=0&dd=B&df=sample.dat">