Installation Guide

Installation Guide

From JobberBase

Jump to: navigation, search

Contents

[edit] Installation Guide (Updated for v1.8)

(For an older installation guide, see: http://www.jobberbase.com/wiki/index.php?title=Installation_Guide&oldid=119 (for 1.7) http://www.jobberbase.com/blog/10-23-2007/jobberbase-installation-guide/ (for below 1.7))

[edit] Requirements

Before proceeding, make sure you have PHP 5+ and MySQL 4.1+ installed on your server. Also, Apache module mod_rewrite has to be enabled and overriding default settings with .htaccess need to be allowed.

If you are 100% sure that your server meets the requirements then you can skip the following lines and go directly to the first step, else please read on.


To see that you have at least PHP 5 and mod_rewrite active, create a file called phpinfo.php and paste the following code into it:

<?php phpinfo(); ?>

Upload it to your server and access it like this http://www.yoursitesnamecomeshere.com/phpinfo.php (Note: the path could differ in your case, specially if you've uploaded it into a subfolder)

The PHP version should appear in the page's header. Make sure that it's at least version 5.

Also, to see that you have mod_rewrite active, search in the page for the string mod_rewrite. If you don't find it, contact your hosting and ask them to activate this module.

[edit] Install Procedure

If the requirements are met, follow these steps:


1. Download the latest version from www.jobberBase.com (if you haven't already done this) and unzip it.

2. Before setting up the database, there are some things that you should be aware of.


2.1 Some hostings don't allow you to have more than one database (usually in case of low-end (very cheap or free) hosting plans). If you know that this is your case, then please follow these steps:

- you must decide for a string (you can use jb_, for example) which will be prepended to every jobberbase table name. You will have to set this string in the DB_PREFIX field that is described in step 3.


- open jobberbase.sql in a text editor of your choice and use its find & replace feature as follows:

(Hint: in the find & replace dialog, there's usually a button (Replace All, in case of Notepad) for replacing all the occurrences at once.)

- replace all occurrences of CREATE TABLE IF NOT EXISTS ` (note the ` char ) with CREATE TABLE IF NOT EXISTS `THE_STRING_THAT_YOU_DECIDED_ON (for example, CREATE TABLE IF NOT EXISTS `jb_)

- replace all occurrences of INSERT INTO ` with INSERT INTO `THE_STRING_THAT_YOU_DECIDED_ON (for example, INSERT INTO `jb_)


- save your changes and then open phpmyadmin, select your database and then import your jobberbase.sql file


Skip step 2.2 and continue with step 3.

2.2 If you know that you can create more that one database, then please do as follows. Create a new database and import db/jobberbase.sql into it (usually done from within phpmyadmin).

Note: PHPMyAdmin instructions: Create a new database (example: jobberbase) in the database window and no need to change any of the default settings. Click Go and the database is live. Now click import from the list of menu items in the top section and select the jobberbase.sql file from your local machine. After refesh you should see the list of example content tables on the left side panel. If any of these things did not work for you then you need read the manual that comes with PHPMyAdmin and try again).


3. Open config_default.php and change the value of the following constants so they suit your environment and rename to config.php after updating:

  • DB_HOST - the URL/IP of the machine where the database is hosted
  • DB_PORT - the port used to connect to sql server
  • DB_USER
  • DB_PASS
  • DB_NAME - make sure it's the same name as the one you have created in step 2
  • DB_PREFIX (only change it if you've followed step 2.1)

Note: some users are having trouble setting the DB_HOST. To find out your database host, either ask your hosting company or login to phpmyadmin and you should have somewhere in the upper area the string Server and next to it an URL or IP. That's what you should put as database host.

If you're running jobberbase on your local machine, then set the above values in the block following the if ($_SERVER['SERVER_NAME'] == 'localhost') line.

If you're testing on a remote server, then put these values in the block following the else line.

4. Upload the content of the app folder to your server. Some users make the mistake that they upload the app folder, but instead you should upload the files and folders contained in the app folder.

5. Make sure that the following folders have write permission:

  • /uploads (uploaded resumes are temporarily stored here)
  • /_templates/<YourTheme>/_cache (smarty cache) - by default, YourTheme is a folder called default
  • /admin/_templates/_cache (smarty cache)

Note: if you are testing it locally using wampserver or MAMP then do this: In windows machine go to folder options and un-check the 'read only' option to enable write access. In Mac OSX running MAMP local server first make sure you have administrator access then check to make sure you have full access for the files by clicking 'get info' in right click or command click pop up menu for each folder.

6. That’s it! Open up a browser and type in your site's URL (e.g. http://www.yoursitesnamecomeshere.com/)!

7. Jobberbase also comes with an administration panel where you can:

  • change settings regarding site details, job pagination, mailing options, url options and lot more. (only in version 1.8+)
  • view all the jobs, activate the new ones, delete jobs, edit jobs, post a new job (the latter only in version 1.7+)
  • change the cities (add/edit/delete) that are included by default in Jobberbase (only in version 1.7+)
  • change the categories (add/edit/delete/reorder) that are included by default in Jobberbase
  • change the header/footer/sidebar links (only in version 1.8+)
  • view statistical information

Supposing that your Jobberbase installation is located at http://www.yoursitesnamecomeshere.com/, you can access the administration panel by visiting http://www.yoursitesnamecomeshere.com/admin/. This section is password protected, the username being admin and the default password admin. After the first login, be sure to change your password!

Your site doesn't work or you have problems? Keep reading.

[edit] Common problems

Before going any further, you should turn on the error reporting. Open config.php and replace this line

ini_set('display_errors', 'Off');
with
ini_set('display_errors', 'On');

After you refresh the browser page, you will see a lot of warnings but that's not a problem.

[edit] Parse error: syntax error, unexpected '{' in /XXX/XXX/XXX/config.php on line 101 (note that the line number might differ in your case - this line number is for v1.8 Installs)

This problem appears because you don't have at least PHP 5. Review the installation guide above to see how can you find out your PHP version and if you don't have PHP 5, contact your hosting provider.

In some cases, although you have PHP 5, it's not active. If this is the case, add the following line:

AddType application/x-httpd-php5 .php

to the .htaccess files (note that there is also one in the admin folder)

[edit] Fatal error: Call to a member function query() on a non-object in /XXX/XXX/XXX/_includes/class.Job.php on line 1025 (note that the line number might differ in your case) or Access denied for user 'yourusername'@'yourdatabasehost' (using password: YES)

There are multiple reasons why you could have these errors:

- be sure that your user name and password (the ones defined in DB_USER and DB_PASS in config.php) are correct - a lot of people misspell them

- be sure that you have imported the jobberbase.sql file and that you have set the correct database name in the DB_NAME constant

[edit] Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct

(This is not a problem specific to jobberbase but it's caused by the configuration of your hosting's PHP interpreter)

Open index.php and add
session_save_path("./tmp");
before the line
session_start();

Create a folder called tmp (in the same folder as index.php) and make it writable.

Do the same also for the /admin/index.php file (don't forget to create the folder called tmp in the admin folder).

[edit] Fatal error: Class 'mysqli' not found in /XXX/XXX/XXX/_includes/class.Db.php on line 16 (note that the line number might differ in your case)

(This is not a problem specific to jobberbase but it's caused by your hosting provider's configuration)

By default, jobberbase will try to connect to the MySql database using the mysqli module but this might not be available. To see if your provider has the mysqli module, search for the mysqli string in the phpinfo page's output (as decribed in the installation guide). If the string is not found, open config.php and replace
require_once '_includes/class.Db.php';
with
require_once '_includes/class.Db.MySql.php';

Jobberbase will now try to use the old mysql module.

[edit] The start page loads but clicking on a category header (or also other links) takes you to /page-unavailable

This can happen for many reasons, two being the most common:


1. you've installed Jobberbase in a subfolder, Jobberbase being accessible via http://www.yoursitesnamecomeshere.com/subfoldername

If this is the case, the following usually helps:

  • add the line RewriteBase /subfoldername to the .htaccess file from your root jobberbase folder

in case you didn't have an htaccess file in your root jobberbase folder, then use a copy of the one in the admin folder

  • add the line RewriteBase /subfoldername/admin to the .htaccess file located in the admin folder


For example, if you've installed Jobberbase in a subfolder called jobs (many of our users do this), then you should:

  • add the line RewriteBase /jobs to the .htaccess file from your root jobberbase folder
  • add the line RewriteBase /jobs/admin to the .htaccess file located in the admin folder


2. you have spaces in the category URL

Let's take the following example: you have created a category named Financial Services and you typed financial services for the URL. This means that this category can be accessed by typing http://yoursitesnamecomeshere/jobs/financial services/ in your browser's address bar. But visiting this link takes you to /page-unavailable.

Jobberbase expects that the category URL doesn't contain spaces (actually, it should contain only the following chars a-zA-Z0-9_-).

The solution is to replace the space character with an underscore (_) or dash (-) in the category URL. For the above scenario, the correct category URL would be financial-services.


For problems not covered here, go ahead and visit the forum. Before posting your problem, please search first because it might have been solved by someone else.

[edit] Lighttpd config

After you have installed jobberBase using the instructions for Apache...see http://labs.ukd1.co.uk/jobberbase/ for a sample configuration file.