Login / Status
developer.Resource
Home . Documentation . Document Library . Installation
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

3.2. .zip distribution

This is a out-of-the-box package for ftp-upload. It is integrated with a testsite that will help you to get started with TYPO3. The filestructure looks like this:

TYPO3 distributed folders and documents

media/, t3lib/, tslib/, typo3/ contains the TYPO3 source-code, files, images and scripts distributed by TYPO3.

index.php is the main script for the website frontend (same as tslib/index_ts.php).

showpic.php is a document used to display images on request (same as tslib/showpic.php).

clear.gif is a 1x1 clear-pixel gif-file. Used many places.

All these files are a part of TYPO3s core, you should never change them and you can write protect them if you like! They are the ones you must upgrade when you install a new version of TYPO3.

Don't change any of these!

Site specific folders and documents

fileadmin/ contains files of your choice, local to the website. You can put templates, user uploads, external scripts, external html and images here. Also used to store uploaded files by default.

typo3temp/ should be empty from the beginning. But gradually temporary files will appear here. The directory must be writeable.

uploads/ contains folders used to store documents attached to database records - hence they should be writeable!

typo3conf/ contains configuration for the local site, eg. localconf.php, extTables.php-files, user-defined modules, user-defined classes etc.

typo3conf/localconf.php contains local configuration for your site.

Custom folders?

Yes, just add whatever you like. Why not?

Duplicates in the .zip distribution

The reason why the .zip distribution for ftp-upload is much larger than the .tgz version is that numerous things are stored twice or more in the zip file; there are redundant file folders. That's not the case with the .tgz version.

It's very important that you are aware of this fact when you want to upgrade a zip-installation of TYPO3 since the same filefolder might need an upgrade two or three places!

t3lib/ and typo3/t3lib/ is the same.

This is a directory with class-files used by the frontend as well as the backend. Both the frontend, TSFE, (in the root) and backend, TBE, (in typo3/) require the directory to be found relative to their own path. Therefore it's listed twice. There are close to 1000 files in the folder, most of them small image-files like icons. And yes, this really isn't that brilliant having 1000 redundant files, but for now that is how it is. Effectively this is only a problem on Windows since Unix has symbolic links to use.

media/ and tslib/media/ is the same.

The media/ folder is used by the frontend. It contains scripts and media-resources used by the frontend. Technically tslib/media/ folder is the 'original' folder, but on an actual site only the media/ folder is (and should always be) used. Therefore you may delete tslib/media/ (if it's not already done to save space in the distribution).

typo3/gfx/ and ...t3lib/gfx/ is the same.

The gfx/ folder represents 850 icons and imagefiles. Those are used primarily in the backend from the folder typo3/gfx/. Some are used by the front-end as well (which is the reason why it's found in the t3lib/ folder anyway). Because the backend (TBE) uses the content of typo3/gfx/ and not typo3/t3lib/gfx/ you may delete typo3/t3lib/gfx/.

index.php and tslib/index_ts.php is the same.

showpic.php and tslib/showpic.php is the same.

typo3conf/tables.php and t3lib/install/tables.php is the same (in most cases should be!).

Why duplicates?

The reason is that the “real” source distributed in the .tgz file uses symbolic links (UNIX filesystem feature) to point to both folders and files, which are duplicates. For instance the folder typo3/gfx/ is a symbolic link (symlink) to typo3/t3lib/gfx/. That means that the content of the folders are actually the same files - if you edit, add or delete a file in typo3/t3lib/gfx/ it's reflected in typo3/gfx/ and vice versa.

So using symbolic links on UNIX is an extremely efficient way to share files and directories without copying them around and as you can see, there are no duplicates in the source-distribution - just symlinks to the 'original' folder. But when you make a zip-file of such a filestructure the linked files and directories are copied as indepent files. This provides the duplicates.

So the .zip-files include redundant code and graphics. The up-side to this is that you don't have to worry about “symlinks” etc. - just upload the zip-file contents to the webserver and run it. The down-side is that the zip-distribution is much larger than the tgz-distribution (and secondly the zip-distribution - that is if you don't use the smart symlinks in the .tgz-distribution - upgrades are a little more work).

On the other hand the .tgz-files are also decompressed by applications like WinZip. Notice, that if you decompress such as the TYPO3 source from a tgz-file (eg. “typo3_src-3.6.0.tgz”) with WinZip the symlinks are simply ignored! Thus you would have to manually copy the t3lib/ folder to typo3/t3lib and the t3lib/gfx/ folder to typo3/gfx/ in order to compensate for that loss. You have the same problem if you checkout the TYPO3 source from CVS.

Please see the section about the .tgz distribution for more details.