Installation

From BBlog

Table of contents

Introduction

Every effort is made to make installing bBlog a simple process. Before you begin you need to know whether your web host provider meets the bBlog's requirements.

bBlog Requirements

  • PHP 4.3.x or higher
  • MySQL 3.23.x or higher (Note: may experience some problems with MySQL 4.1.x)
  • Apache 1.3x/2.x, IIS

Other web servers may work, Apache and IIS are merely the ones we could test.

Pre Install

To install bBlog you need to know the Host address for MySQL along with the username and password used to access MySQL. With some web hosts you can use localhost for the Host address. Also, the username and password you use to login to your web hosts control panel is often the same for MySQL access. However, each web host is different.

In the following instructions, www.example.com is used for demonstrative purposes, please replace www.example.com with your domain name.

Upgrading

If you already have a previous version (0.7.x) installed, follow the upgrade instructions below. A full re-installation is not neccessary.

copy your blog directory (it contains index.php and the bblog subdirectory) to another location as a backup incase anything fails.

Extract the latest version of bblog to where it should be, and copy your config.php into this new version (overwrite the empty one if neccessary).

Go to your www.example.com/bblog/install.php (exact path depends on where you installed it. See Choosing your Blog Location). When running the install script, proceed until you see the page that says 'To run the upgrade, click here'. Click the link to run the upgrade.

Follow the instructions that appear when the upgrade has completed.

Preparing for Upload

After downloading bBlog (http://www.bblog.com/download.php), extract the archive to a folder on your local hard drive.

You should see a directory layout like so:

  • /blog
    • archives.php
    • /bblog
      • BUGS.txt
      • CREDITS.txt
      • /compiled_templates
      • ... more folders and files
    • htaccess-cleanurls
    • index.php
    • item
    • rss.php
    • section

It is useful to understand how bBlog is packaged in this archive. The files under /blog/ are the scripts that allows your blog to be displayed to visitors. The files under /blog/bblog/ are the administration scripts.

Choosing your Blog Location

Before uploading the package to your webserver, you will need to decide where your blog will go.

Subfolder

  • The first option is www.example.com/myblog/
    • The blog is in a subfolder (here /myblog) of the main website

In order to have bBlog running in www.example.com/myblog/, you have to copy the contents of the /blog folder and subfolders to a /myblog/ folder on your webserver.

In this case, it would be something like /www/myblog perhaps /htdocs/myblog or /web/myblog, even /public_html/myblog.

Root Folder

  • The second option is www.example.com/
    • The blog is in the root directory of your website

In order to have bBlog running in www.example.com, you have to copy the contents of the /blog folder and subfolders to the root folder of your webserver.

In this case, it will be something like /www, /htdocs, /web or even /public_html

Beware! Do not copy the /blog folder, or bBlog will be installed on www.example.com/blog. And that's not what you want if you are installing to the root of your site!

Preparing for Installation

Once uploaded, change your working directory to the /bblog directory. Inside here should be the folders /cache and /compiled_templates, as well as other bBlog folders.

You need to CHMOD and/or CHOWN the following folders and files to be writable by the webserver:

  • /cache/
  • /cache/favorites.xml
  • /compiled_templates/
  • /config.php

(On Red Hat: chown apache cache/ cache/favorites.xml compiled_templates/ config.php )

The installer will tell you if these files are not writable. Depending on your webhost, you may have to issue a "chmod +w" command.

(Note: If you're running your Webserver at home on some Win32 System, make sure that those files are not marked "Read only".)

(Note: If your extraction from the .gz file did not create it, you may need to create a bblog/compiled_templates/ directory.)

As mentioned in the documentation, bBlog requires sessions to be enabled on your web server. If you are using the Apache Web Server, you will probably have to create a directory named session in your bBlog directory you uploaded (alongside bblog and index.php). If sessions are not working properly, you will get an error on the first page of the install procedure.

The following folders and files need to be readable by everyone:

  • /bblog/templates/default/default.css




Installing bBlog

Finally, we need to run the installer:

  • If you uploaded bBlog as in option 1, you should go to www.example.com/myblog/bblog/install.php
  • If you uploaded bBlog as in option 2, you should go to www.example.com/bblog/install.php

Follow the instructions provided by the installer.

Note for IIS users:

If you are installing onto an IIS server you also need to make the following IIS Specific Changes


MySQL socket access:

If you are intending to connect to a MySQL server through a socket file, provide the file in the "Host" field when prompted, with some ":" in front of it.

Like in Host: /var/run/mysqld/mysqld.sock

Post Installation Tasks

Once the install is complete, make sure config.php is NOT writable by the webserver. You should also delete the install.php and the install folder.

On Linux:

   cat config.php >zoot ; mv zoot config.php
   rm -r install.php install/

To login, go to www.example.com/myblog/bblog/ or www.example.com/bblog/ and enter your admin username and password.

Installing Multiple Versions of bBlog

With the current version of bBlog, it is possible to have multiple blogs on one website. All default bBlog tables in your MySQL database are created with the prefix bB_ and it is a simple task to change this to something unique. The recommendation is a simple one or two letter addition to this prefix, e.g. bBmb_ which would stand for "bBlog My Blog". Once you have customised your install.php script, upload it with the rest of the package as in step 2 above.

Installation Problems

Installation Loops

  1. Check security settings in your browser (must enable cookies)
  2. Check your cookie settings in =php.ini= (use the ones from =php.ini-dist=)
  3. Check that you have sessions enabled in =php.ini=

Pages Don't Load

  1. Editing a template file may hold a lock. Until you finish editing, your blog may just freeze

Diagnosing Errors

  1. Blank page = PHP error. Check your php error log
  2. Check your web server error log
  3. Template errors: Isolate error by changing the template to remove offending functions/modifiers
  4. ini_set() errors: sometimes ini_set is disabled on web servers for security reasons. Edit the .php file causing the error (usually bblog/inc/init.php) and comment the offending line with //. This might cause other, rarer problems though.

Asking for Help

  1. Copy of relevant php error log entries
  2. Copy of errors seen on screen
  3. Copy of config.php (WITH THE PASSWORD BLANKED OUT)
  4. PHP version, MySQL version (On Red Hat: php -v ; mysql -V)
  5. Link to page (if possible)
  6. Any changes and modifications to the standard bBlog install files
  7. Copy of any relevant template code