HOWTO:Install e107

From e107 Wiki

Contents

Introduction

This is the most up to date information available on how to install CMS e107, and supercedes any general information included with a particular release.

In most cases the install should go smoothly providing you follow these instructions carefully. If you encounter problems please refer to the troubleshooting help and then check the installation/upgrade forum

Before you start with e107 you can always watch a Video Install Tutorial to use it you need Flash Player installed and the sound turned ON Ignore the references to v0.7.2 as the install procedure hasn't changed and is the same in versions up to v0.7.11. There are also a whole range of video tutorials available at Spinning Planet including plugin and theme uploading, theme creation et. etc.

Note: Clicking the link to 'Spinning Planet' will popup a window for a username and password - just make sure you have ad blocking/popup bocking OFF or add the site to your 'whitelist'

Requirements

  • e107 requires a web-server with:
    PHP 4.3.0 (or newer)
    MySQL 3.22 (or newer - 4.1 or newer recommended)

Contact your host if you're not sure if you have these installed. The configuration of PHP must be acceptable - in particular:

  • the realpath() function must be operational.
    Some features require access to a suitably configured mail server - SMTP (preferred), PHP or 'sendmail'.
    Some image-related features require either GD or ImageMagick

Please Note: that many of the free hosts (and some others) restrict (in some cases severely) functionality in ways which prevent e107 from operating properly.

Note: MySQL version 4.1 or later is recommended - e107 up to version 0.7.11 will run on versions as old as 3.22 (except for a few lesser used functions). However later versions will require MySQL 4.1 or later and PHP 4.4 or later. Ideally choose a host which supports mySQL 5.x and PHP 5.x, or is committed to doing so soon, since at some point in the future that will become the minimum requirement.

fused.gif e107 itself is hosted by Fused Network which is a good example of what you need to run a busy site. e107 users can use the coupon code WeLoveE107 at Fused Network to get 10% off a hosting package, for the life of the plan.


Key problems with free hosts are:

Some free hosts disable the 'realpath()' function, which stops e107 from working and increases the security risk.
Some free hosts will not allow e107 to send email, which can restrict the capabilities of your site.
Known problems are listed here

You're accessing this information via the Internet and nothing on the Internet is actually 'free'. Someone, somewhere, is paying for that privilege. Be it your employer, School, Parents etc - so to get the Best from e107 be prepared to pay a few $, £'s or whatever currency you use to pay for a decent hosting service unless you have the equipment to host a web site yourself (see below)


  • If you host your own site you can download PHP and MySQL and install them yourself, both are free. You can also use AMP packages like easyphp, XAMPP, apache2triad or MAMP (for MAC) (all of which include php and apache as a package but not necessarily the latest versions of each) to host a web site on your Home PC if you have a fast Internet connection. Pay attention to security issues if you choose this route - many of the 'all in one' packages (intentionally) have minimal security as default, since they are intended for local installations. See also: How can I install a running web server?
  • You will need your MySQL username and password, and a database for content storage. Don't worry if you only have one database, e107 is happy to share it's database with other applications.
  • A full e107 install requires approximately 10MB of disk space on your server, though it is recommended that plugins that you don't intend to use are not uploaded to the server. This is helpful in 3 ways - it constrains disk space usage, will have a performance impact and may help with security. You will probably need additional disk space for some of the site content - potentially a lot more space if you are uploading large documents, high-resolution photos, video clips and similar.
  • You may wish to test out e107 before creating your final web site. You can do this by installing some software on your PC - such as easyphp or XAMPP or MAMP (for MAC) - and then installing E107 locally. E.g. USBWebServer can even be started from USB.

Uploading e107 To Your Webspace

e107 will happily run in your webserver root or in a sub-directory

After downloading the package, you need to upload the files to your server using an FTP client :

1. Uploading files one-by-one

This is the most popular procedure used, but not the most efficient (as upload error may occur and it takes a certain time to do it)

note|If you have any doubts or problems with this then watch the Video Tutorialsat spinning planet.

Note: Clicking the link to 'Spinning Planet' will popup a window for a username and password - just make sure you have ad blocking/popup bocking OFF or add the site to your 'whitelist'

  • After unzipping the package
  • Open your FTP client and connect to your webserver
  • Move into the folder on your webserver where web pages are stored, generally it's 'public_html', 'www' or 'html'
  • Copy all the files from the unzipped e107 package onto your webserver - this could take a while, time for a cup of coffee!

2. Unzipping the package directly into your server

If you have the correct permissions on your server you can use an alternative (and much quicker) method to upload the files:

  • Download the e107 package in tar.gz format from e107.org
  • Using your FTP client, upload the tar.gz to your webserver without unzipping it first
  • Now open a shell prompt, and navigate to the folder where you uploaded the e107 tar.gz
and type tar xvzf file.tar.gz to unpack the archive.
  • Note. this can also be achieved with a web based file manager. Many cpanel installations come with a file manager or you may download a php based file manager to use. These generally have the ability to unzip/unarchive files.


Installing a language pack to your e107

Many translations are available for this CMS and you may install as many languages on your site as you wish. Get them here !

Ensure that you use a language pack corresponding to the version of the e107 package you're using (otherwise, you may see messages of the form LAN_BANNER_XX instead of comprehensible text).

  • The language pack are zipped with the same folder pattern as the e107 core. You just have to extract the language archive to the root of your e107.
  • Use either method 1 or 2 to do so.


Setting File Permissions

Core

The following permissions could be set to use e107 core (most of these will have already been set this way from your previous 0.6xx install if upgrading):

directories purpose write access compulsory
e107_themes/ themes upload for install till v0.7.11
e107_plugins/ plugins upload for install till v0.7.11
e107_files/public/ used to store uploaded files,

e.g. Public Upload and Forum

for install till v0.7.11
e107_files/public/avatars/ avatar upload for install till v0.7.11
e107_files/cache/ e107 cache system for install till v0.7.11
e107_files/downloads/ files no
e107_files/downloadimages/ images. shows in download no
e107_files/downloadthumbs/ thumbnails. shows in download no
e107_images/newspost_images/ news images upload no
e107_images/custom/ custom pages/menus upload no

Note: the file permissions required will vary somewhat according to the web server configuration (which may well be outside your control). '777' permissions is often required for write access but does not always work. On some host it is recommended to not chmod more than '755' for security reasons.

In most cases '755' is sufficient for directories containing executable files, and '644' for directories which have 'data' files - images, downloads and so on. Directories to which users may upload through E107 will generally require '777' or '755' permissions depending on your host.

In general, grant the minimum level of access necessary for your site to work.

If you have any doubts or problems with this then watch the Video Tutorials at Spinning Planet

Note: Clicking the link to 'Spinning Planet' will popup a window for a username and password - just make sure you have ad blocking/popup bocking OFF or add the site to your 'whitelist'

Plugins

The following permissions will need to be set if you were using statistics in your 0.6xx site (if upgrading) or wish to use the new Statistic Logging plugin at some point in the future:

  • write access: e107_plugins/log/logs/

The following permissions will need to be set if you were using the links page in your 0.6xx site (if upgrading) or wish to use the new links page plugin at some point in the future:

  • write access: e107_plugins/links_page/cat_images/
  • write access: e107_plugins/links_page/link_images/

The following permissions will need to be set if you were using Reviews/Articles or Content in your 0.6xx site (if upgrading) or wish to use the new Content Management plugin at some point in the future:

  • write access: e107_plugins/content/images/cat/
  • write access: e107_plugins/content/images/cat/16/
  • write access: e107_plugins/content/images/cat/48/
  • write access: e107_plugins/content/images/file/
  • write access: e107_plugins/content/images/file/tmp/
  • write access: e107_plugins/content/images/icon/
  • write access: e107_plugins/content/images/icon/tmp/
  • write access: e107_plugins/content/images/image/
  • write access: e107_plugins/content/images/image/tmp/
  • write access: e107_plugins/content/menus/

See CHMOD and Unix Permissions for further details on file permissions.

Running The Installation Script

Now open your web browser and navigate to install.php, for example click to open link in new window or click to open link in new window:

  • Step 1 - If all the files have been uploaded successfully, you will see the first page of the install script. Choose the language you wish to use during the procedure and click the button to continue
  • Step 2 - e107 will now carry out a series of tests to see if requirements are met and all files that need permissions set are ok to be written to. If you get a warning about mySQL don't worry too much, some versions of mySQL don't return the correct version, or return nothing at all. Click on the button to continue if all criteria have been met, or else repair the problem and retest.
  • Step 3 - Next you have to enter your mySQL details. Enter your server name (generally 'localhost'), username and password. If you don't know your username and/or password contact your webhosts.
Now enter the name of the database you want e107 to use.
If you have the correct permissions you can create the database directly from the install script should you want to. (Note that some hosts modify the database name which you enter - for example by prepending a server name, or adding in the user name. Thus it is often simplest to manually create an empty database, so that you can see the name to use).
e107 can also share a database with other applications - you can specify a prefix which is prepended to all the table names to distinguish them. Just ensure this prefix is different to any which is already in use.
If necessary, follow these instructions : Detailed instruction to connect to your MySQL database
  • Step 4 - If all is well e107 should now connect to your mySQL database, if any error messages are shown return to the previous page and make sure you entered your details correctly Now you have to enter your main admin details. Enter your username, password and email address, you can change your email address and password at a later stage but your username cannot be changed, so make sure you enter it correctly
  • Step 5 - e107 will now create the mySQL database tables and populate them with settings etc
  • Step 6 - If all is well, the last button will take you to your new website. There, all done, that wasn't too bad was it?!
If you have any doubts or issues then watch the Video Install Tutorial

Securing Your Configuration File

You must now set the file permissions of the main config file back to 0644:

  • Using your FTP client, select the e107_config.php file
  • Set its file permission to 0644
  • Now delete the install.php file from your server, if you do not there is a potential security risk to your site
  • Also make sure you don't have an index.htm or index.html file in the root directory of your site - otherwise this will display instead of your new E107-based site.


Checking your Installation

You should now be able to log in to your new website using the login name and password which you set during installation.

  • Once logged in, click on the 'Admin Area' link (in the login area) and you should see the main administration screen.
  • Click on the 'File Inspector' icon
  • Set the options to check everything (which is the default) and click on 'Scan Now'.
  • Look at the results - if all is well you will see a list on the right which includes the information:
If you have uploaded extra files, or have carried out other changes since uploading and installing, you may need to examin the results of this test in more detail to establish whether there is a problem.
Integrity Check ( All files passed )
 Core files passed: 2194 	7.78 mb
 Core files failed: none 	0 b
 Integrity incalculable: 2 	251 kb


(actual values may vary - the concern is that we require zero core files to have failed).

  • If all is well the file upload was successful and you can proceed to the next section.
  • If any files failed, identify which they are, and upload them again. The left hand side of the screen shows a file tree through which you can identify the problem files - or you can re-run the test with 'Show Core files with Integrity Fail only ' and 'Display Results as list' to get an itemised list of the files which need attention.
  • Hopefully uploading any problem files will resolve the problems; if it does not, it could indicate a server setup problem (often due to mod_security) which should be discussed with your host.


Setting allowed file types for Upload

Only certain types of file may be uploaded through e107; for maximum security these are set in a text file called filetypes.php, which is found in the e107_admin subdirectory. There is a sample file e107_admin/filetypes_.php containing the most common file extensions required; in most cases you can simply rename this file to e107_admin/filetypes.php. It is a simple text file which contains a comma delimited list of allowed file type extensions - you can add and subtract from this list as you wish. You should not allow the upload of .html, .txt, etc as an attacker may upload a file of this type which includes malicious javascript. You should also, of course, not allow the upload of .php files or any other type of executable script.


Accessing your Site

Simply enter the 'root URL' of your site into your web browser. If you have installed E107 in the base or root directory of your web space, this will just be your domain name. If you have installed E107 in a subdirectory, add that to the domain name.

You should see the 'welcome' screen, and can log in as administrator and start configuring your site.


Next Steps

The next steps will depend to a great extent on what you want to do with your system. There are some 'core' features, which are always present. Then further functions are available as 'plugins' - modules which may be installed if required, and ignored otherwise. Additional plugins are available from various sources. The appearance of your site is determined by its 'theme' - a number are included with the standard distribution, many more can be downloaded from various theming sites, or you can create your own.

There are some general pointers on this page, and more detailed information elsewhere in this e107 Handbook.

Whatever your needs, we suggest you take some time to explore the various admin menus and start to understand the wide range of features available to you.

If you have any problems once you have installed e107 look at HOWTO:Solve post install problems

Alternative: cPanel Script Install

It should be noted that this is not the preferred method - the script is often many versions behind the current release version, and thus cannot be relied upon if security flaws are discovered and fixed

Cpanel is a control panel very widely used in hosting. If the panel has Fantastico installed (a plug-in which has a script library), then the user can install their CMS without the need to even fill out what database name. The plug-in will create the Database for you, and make the installation.