Wednesday, February 18, 2009

Uploading Scripts

Why Upload Scripts in FTP

If You are Uploading Scripts You Have to Use FTP
. This is because they will be corrupted if they are not uploaded in ASCII. It's not possible to upload in ASCII using the CPanel.

If you don't have an FTP Client, see the last 2 posts on where to get one and how to set it up and use it.

If you go to the top of your FileZilla window and select Transfer - Transfer Type you will see a dropdown that offers ASCII, Binary and Auto. Left on Auto, FileZilla is pretty good a working things out for itself, but you may care to select ASCII if you are loading scripts and you want to be sure.

Why Scripts are Different From HTML

Because scripts like CGI and PHP differ from HTML in that their function is to run systems and execute commands, rather than simply displaying pages, their mode has to be adjusted once they are on the server so they can work. This operation is known as CHMOD (change mode) and it can be done with File Zilla. It is a matter of changing the "permissions" that are given to the file so it can work on the server.

How to CHMOD Scripts in FileZilla

You will find instructions - usually in the readme.txt file that comes with the script - on what is required by way of permissions for the particular functions your script has to perform.

To CHMOD a file, select it in the right-hand panel of FileZilla, right click on it and select File Attributes from the drop-down. You will be presented with a window called "Change File Attributes".

File Attributes relate to the "permissions" for the file, and how they should be set depends on the functions that particular file has to perform. There are 3 functions - Read, Write, and Execute.

These functions need to be set for 3 parameters :
Owner Permissions;
Group permissions;
Public permissions.

The instructions for the sript will tell you what is required for each of thses parameters and usually the modes are set out in words, with a numeric value assigned to the whole combination.

Simply work your way through each of the parameters, checking or unchecking boxes to get the combination right, and you should find once you've done this that the box containing a number below the checkbox panel is the same as the number your script instructions provide you with. If if isn't, check again very carefully and you may find you've made a mistake somewhere.

Once the number in the window reads correct, you can OK your CHMOD and proceed to the next file.

Patricia Howitt
Webdesign, Graphics, Marketing
1st Class Web.Biz


Technorati Tags:
, , , , , , , ,

No comments:

Post a Comment