Installing MyPHPBib

Home | Requirements | Install | Using

Before you start

MyPHPBib has quite a few dependencies, so make sure you have looked at the requirements, installed any extra libraries, edited php.ini (if necessary), and that you have a good, strong coffee close at hand. Here we go...

Overview

To install MyPHPBib you need to:

  1. Download and unpack the MyPHPBib distribution into a folder in your web site
  2. Create database, create user for database (A tool like phpmyadmin or CocoaMySQL makes this easy)
  3. Install bp package for importing references
  4. Configure: Edit configure.inc.php
  5. Start using by creating the first user account

1. Getting started

Download and unpack the MyPHPBib distribution. Put the folder into a folder visible over the web. On a Linux box this might be /var/www/htdocs if it is going on the root of the site, or in your public_html folder if you are serving files from your home folder. On a Mac OS X machine, put it in your Sites folder.

2. Creating the MySQL database.

You need to create a database for the bibliography. The instructions below are for a command line interface. You might also be able to use a graphical MySQL client to do some or all of the steps below.

Create MySQL database

Create a new database for your bibliography:

 mysqladmin -u dba_user -p create bib

MySQL will prompt for the dba_user database password and then create the initial database files, in this case for a database called bib. Next you must login and set the access database rights:

 mysql -u dba_user -p

Again, you will be asked for the dba_user database password. At the MySQL prompt, enter following command:

 GRANT ALL PRIVILEGES ON bib.*
 TO nobody@localhost IDENTIFIED BY 'password';

where

If successful, MySQL will reply with

Query OK, 0 rows affected

to activate the new permissions you must enter the command

flush privileges;

and then enter '\q' to exit MySQL

>Once the database is created you need to load the required tables, which are in the file mysql.sql in the folder phpbib/schema

mysql -u nobody -p bib < phpbib/schema/mysql.sql	

Using CocoaMySQL

Create database

CocoaMySQL provides a simple GUI to MySQL databases. Connect to your MySQL database, then click on the “Create new database” icon (with the “+” symbol) to create your bibliographic database. Give the database a name of your choosing. Then go to the File menu and chose Import | Import CocoaMySQL dump to load the file mysql.sql.

3. Editing the configuration files

Open the file config.php.inc and edit the settings.

Site name and address

Give your site a title (this will appear in the site header) and specify the base_url of the site.

$config['title']   = "My site";
$config['base_url'] = "http://somthing.org/mysite";

Database access

Set the database name, user name and password so that MyPHPBib can talk to MySQL.

$config['db_name']   = 'mydatabasename';
$config['db_user']   = 'username';
$config['db_passwd'] = 'password';

Sablotron

If your copy of PHP has the XSLT extension installed then you can leave the sabcmd setting blank. However, if you don't have the XSLT extension (for instance, the PHP that comes with Red Hat 8 doesn't) then you need to have access to Sablotron.

$config['sabcmd']       = '/usr/local/bin/sabcmd';

Web proxy

If you access the web through a proxy server, then set the details of the server here to ensure that the code that talks to PubMed functions correctly. Otherwise leave these settings as they are. For example, at Glasgow University the proxy_name would be http://wwwcache.gla.ac.uk and the proxy_port would be 8080.

$config['proxy_name']   = '';
$config['proxy_port']   = '';

Temporary folder

On most Unix machines the default setting of tmp should be fine.

$config['tmp_dir']      = '/tmp'; 

4. Install bp

To install bp unpack the file bp-0.2.97.tar.gz (this file is in the bp folder). By default bp is installed in folder specified by the BPHOME variable in the Makefile. You can set this to something else in your system, so long as Perl will find it. To get a list of Perl include directories type

perl -e 'print join("\n", @INC)'

on the command line. For example, on a Mac OS X machine, you might get something like this:

/System/Library/Perl/5.8.1/darwin-thread-multi-2level
/System/Library/Perl/5.8.1
/Library/Perl/5.8.1/darwin-thread-multi-2level
/Library/Perl/5.8.1
/Library/Perl
/Network/Library/Perl/5.8.1/darwin-thread-multi-2level
/Network/Library/Perl/5.8.1
/Network/Library/Perl

Once you've set BPHOME, then type:

sudo make install.lib

to install.

Additional bp files

To add support for RIS and ISI files copy the files bp-ISI.pl and bp-ris.pl from the bp folder to the folder where you installed bp (i.e., the folder specified by BPHOME).

5. Creating an administrator account

Now, point you browser to the folder in which you installed MyPHPBib. If all went well you will be asked to supply a user name and password for the administrator (normally this will be you). Once you have entered these values you will not be asked to do this again. The administrator alone create new users.

You're done!

Now, take a look at using MyPHPBib.