Loading variables from a text field and Editing/Updating the values via Perl - Page 4
Part II - Uploading your Perl script and changing Permissions
1) Upload the the files "UpdateVars.cgi" and "subparseform.lib" to your cgi-bin on your server. IMPORTANT: these must be uploaded in ASCII mode. They will Not work if you upload them in binary mode.
2) Upload your Flash swf and the text file "Ex2TextFile.txt" in Binary mode to any directory you want.
Changing the Permissions of the uploaded files on your server
You need to change the permissions of the files "UpdateVars.cgi" and "Ex2TextFile.txt". The easiest way to do this is by using telnet to log-on to your account. Their are other ways but this is the most basic - others may be easier but it would be impossible to explain them all (ask your host how to change permissions if you are having trouble with this). Once you have successfully entered your login name and password you will see the shell prompt. You must then use the CD (Change directory) command to get to your cgi-bin. You can then list all the files in that directory by typing in ls - this will list the files located in that directory. You can type in ls -l to list all the files plus their permissions in that directory. In most cases it will be something like this:
%cd public_html %cd cgi-bin %ls -l total 2 -rwxr-xr-x 1 Jun 24 15:30 UpdateVars.cgi -rw-rw-r-- 1 Jun 24 15:00 subparseform.lib %
I don't want to go into all the details on setting the file permissions so I'll just tell you what you need to do for this script. You need to change the permissions to 755. You can do this with the following command.
%chmod 755 UpdateVars.cgi
You also need to change the permission of the text file "Ex2TextFile.txt". To do this follow the same procedure as above. Use the CD command to get to the directory where this file is located. Change the permissions to 777. This allows you to write over the file with a cgi script. You can use the following command.
%chmod 755 Ex2TextFile.txt
|» Level Intermediate|
Rating: 8.77 Votes: 99
|No details available.|
|Download the files used in this tutorial.|
|Download (19 kb)|
|More help? Search our boards for quick answers!|