Scripts & CGI FAQs
- Can I write my own scripts?
- Can I use scripts I find on the Net?
- Where do I upload my scripts?
- What are the paths should be using?
- I am getting a server error, what did I do wrong?
- Can you write or re-write script for me?
A. Yes, of course you can.
A. Yes, there are many freely downloadable GNU licensed scripts available on the net. You can use them just like you would use the ones you wrote as long as you follow the license guidelines. We however do not condone the use of non-licensed scripts and will not assist in anyways to make them work.
A. You will want to upload you scripts in either the same directory as your html files, or make a sub directory called scripts, or some other name you choose, and place them in there. DO NOT create a CGI-BIN directory, your script will not work, as any reference to cgi-bin refers to CalWeb's global cgi-bin directory, and for obvious reasons you would not be able to upload your files there, thus your script will never be called if that is the path you used in your web page. One other thing to do is remember to upload your scripts in the format they are needed to run in, ie: a perl script will need to be uploaded as ASCII, a complied script will need to be uploaded as binary.
A. The path to PERL is /usr/bin/perl, The path to SENDMAIL /usr/sbin/sendmail, any other paths needed? You can do a whereis command from the prompt of your shell access.
A. The most likely cause of you error is the permission settings. You have to be the owner of the directory and script you are uploading. You need to verify the the script has the correct bits active, ie: rwxr-xr-x (meaning root-group-world must have the x or execute bit active). You should also try changing the script extension to .cgi. Also if the script is trying to access restricted areas of the server, your script will not work at all. If your script requires a root process, your script will not work. There can also be errors in the script that may cause it not to work. If you wrote then the suggestion is the look over your coed line by line. If someone else wrote your script you may want to ask them for assistance.
A. Yes, we sure can.
Comments about this FAQ? E-mail us!
Note: Links to external web sites are provided for informational purposes, and are neither endorsed nor support by CalWeb Internet Services.