Site File Introduction and Questions Back to Main FAQ

MacOS 8 - Buy It Now
Join the Mac OS 8 Web Campaign!


1. What are site files?

2. How do I set up a site file?

3. I am having problems uploading my site. What do I do?


1. Question: What are site files?

Answer: Site files are a new feature in CHP 2.0. When you develop a site with CHP, you can create a site file in the root directory of your site. It stores information about the site, such as the name of the server where you keep your site, the directory on the server where your site is stored, and when you last uploaded your site. The site file has the capability to "consolidate" your site, and maintain a mirror image on your server.

Basically, you have a site, you make a site file, you click the "Upload Site" button in your site file, and your site is on the web. Make some changes, save, click the "Upload Site" button, and your changes are made to your site on the web.


2. Question: How do I set up a site file?

Answer: First you have to have a site, or the beginning of one. As an example, I will use this CHP FAQ site. Its URL (Universal Resource Locator) is http://www.ee.pdx.edu/~jeskem/chpfaq/. This means that it is stored on the web server at www.ee.pdx.edu, and from the web server's point of view, the site main directory is located in ~jeskem/chpfaq/.

On my hard drive, I have a folder named chpfaq, and inside it are the files and sub-folders of the site. So first, I will put a site file in the main folder/directory of my site.

Creating a Site File

FTP Settings

Image Policy

Uploading the Site

Statistics

 

Creating a Site File

Site File icon    Open the "File" menu and choose "Site" from the "New" sub-menu. An "Untitled" Site file will open. Choose "Save..." from the "File" menu, and navigate to the main folder of your site on your hard drive and click the "Save" button.

Now I'll go through the settings in the site file.

FTP Settings

CHP Site File FTP Settings Screen Shot

Server Name

The first field asks for the name of the server where the files should be transfered. In the case of the CHP FAQ, I have dropped the www from the front of the address because of the setup of the network where my site is. Other service providers may have different addresses for uploading files as well. A local service provider here in Portland, Oregon, Teleport, has its users upload files to ftp.teleport.com, while the web server is at www.teleport.com. (For those who use fetch to upload files, use the same address).

User Name

Your user name on the server that hosts your web site.

Remote Directory

The directory on the web server that where the site is located. Make sure to use the actual path to your base directory, not the URL's path. For example, the path in the URL for the CHP FAQ is ~jeskem/chpfaq/ , but the actual location of the CHP FAQ on the server is ~jeskem/public_html/chpfaq (I have directory www linked to public_html), so I must use that path (~jeskem/www/chpfaq/).

WARNING! If you do not use the actual path but instead the URL's path, your web site will probably be saved in the wrong place, and it will be a hassle to have to delete it.

Remember to include the main folder/directory of your site in the path, as CHP will not create a folder on the web server to match the your main folder on your local hard drive.

If CHP finds that any of the directories in your path or in your site do not exist, it will create them for you on the server.

Before Upload

This pop-up menu gives you three options: Always Consolidate, Never Consolidate, and Ask Me before Consolidating. Consolidation means that CHP goes through all the linked images in your html files, copies them to the same directory as your html files, and changes all the image links appropriately. This feature is great for those who have used a lot of clip-art from the included collections, or from other places on their computer. However, many people, including myself, like to both have images in seperate folders, and share images between many pages which may not be in the same folder. In this case, you can select Never Consolidate, or Ask Me. As long as your image files are somewhere within the hierarchy of your site, they will be uploaded.

Only upload files which ...

After the first time you upload your site, you should check this option; it saves you time. In order for this option to be effective, make sure to save changes to your site file when you close it.

Image Policy

CHP Site File Image Policy Screen Shot

These options are pretty straight-forward. My recommendation is to use a images folder because it keeps things more tidy. Note that these settings only apply to Consolidation of your site. If you choose not to consolidate, these settings don't matter.

Uploading the Site

This is the simplest step: Click the Upload Site button, type in your password, and wait.

Always check to make sure that your site works correctly on-line by going to a different machine and viewing it in a browser or two. (You can also use the same computer, but you run the risk of not discovering links that lead to files on your own hard drive.)

Statistics

The last section of your site file is Statistics. Clicking the Refresh Now button will give you the latest information about your site: where it is on your hard disk, how many HTML pages it has, and the total amount of space it uses.

Final Note

Remember that a CHP site file will upload all the documents within its directory snd sub-directories, not just html, gif, and jpeg files, so keep any private files out of your site's folder. TOP


3. Question: I am having problems uploading my site. What do I do?

Because the Site upload is a complex process, there are many factors which may cause an error. Below is a list of Symptoms and Solutions

When you begin to upload the site, a dialog appears saying you do not have permission.

  • Check that you entered the correct account information. (Does the username you are logging in with have access permissions to the remote directory?)
  • Is the remote directory entered correctly? If you used an FTP client to access the remote directory, you should be able to use the same path.
  • If your web server is set up so that each user has a public_html directory in their home directory, and you are uploading a site to the public_html directory or one of its subdirectories, try using:
    ~username/public_html/
    instead of the actual path to the public_html directory. (Sometimes web servers don't see things in quite the same way as normal people, so this will let them figure out the location for themselves.
  • Finally, for some strange reason you may not have write permissions to your own directory. In this case, either change these yourself (using chmod if you are on UNIX) or contact your system administrator.

After making corrections to a site and selecting the "Only upload files changed since last upload" option in my site file, CHP still uploads all my files to the server.

  • Under some circumstances, even though the uploading dialog box will say "1 of 45" (if there are 45 documents in your site), only the ones that have changed will be uploaded. This appears to be a display bug in CHP. It has been observed in the MacOS version.
  • Make sure you save the site file before you close it after uploading a site. If the Save ... menu item is dimmed and unavailable, uncheck then recheck the "Only upload files changed since last upload" option. Now,the Save menu item is available. Under some circumstances, CHP seems to not realize that changes have been made. This bug should be fixed soon.
  • In an extreme case, you can try turning off the remember password option in the Preferences:General dialog box. On my system this does not seem to matter, but if this method works for you, send me an e-mail.

After about 60 files are uploaded to the server, an error message appears about Server Passive Mode.

  • There may be a limiting factor in the number of files that can be uploaded. It is unclear whether this is a limitation of the server or of CHP. Try breaking up the site into a couple of directories, each with its own site file.

After I upload using the site file feature, there are problems with my site. Image maps don't work, spaces between some words are missing, and other formating doesn't completely work.

  • These symptoms may be caused by what I call the line break problem. Each platform (Macintosh, UNIX, Win/DOS) has its own way of doing linebreaks in text files, so though they all use the ASCII format, the actual ASCII characters which represent a line break are different.So normally, when text files are transfered across platforms, the line breaks are translated. CHP apparantly does not do the translation during its upload process, so the files it puts on the server are exact duplicates of the files on your hard drive. This works great if you use a Mac uploading to a Mac server, but if, like me, you author your site on a Mac, then upload to UNIX, you get a series of problems. These include:
    • Missing spaces between words about once a line. (When the line break disappears, there is no longer a space between the word at the end of one line and the word at the beginning of the next.)
    • Image maps and other HTML tags not working because vital spaces are missing.
  • The way to remedy this is a setting in your preferences. Open the preferences from the Edit menu, and select the HTML Output panel from the pop-up menu on the upper-right. Change the Line Break Format option to the platform on which your webserver runs. For the CHP FAQ, I set it to "Unix (LF)". If you are unsure of the platform of your server, it is most likely Unix. This should keep the symptoms above from appearing.
  • There are some drawbacks to this. First, if you set the Line Break Format to one other than that of the platform where you use CHP, then open your CHP files with another program, instead of line breaks you will see little boxes representing non-printable characters. Also, for any text file you create in another program that will be accessed on the server, you will need to replace all line breaks with the non-printing character (use cut-and-paste). This does not apply to .hqx files and other text files which will first be downloaded the client computer.
  • This issue will hopefully be resolved in the next release of CHP.

 


Created by: Marcin Jeske (jeskem@ee.pdx.edu)

 Made with Macintosh and Claris Home Page