This article deals with upgrading an existing installation of PhpGedView.
Before you start
- Check the version of your current PhpGedView installation. It is displayed on the site admin page.
- If your current version is 3 (or earlier), read the Upgrading from 3.x to 4.x article first. Direct Upgrades from version 3 to the latest version have not been tested, although they may work. It might be safer to upgrade to 4.0.2 as an intermediate step.
- If your current version is 4 (or later), follow the instructions on this page.
- Check the version of PHP on your webserver. You can find this out by following the 'PHP Information' link on the site admin page.
- If you have PHP5.2 or later, you can run the latest version of PhpGedView.
- If you have an older version of PHP, you should install PhpGedView 4.1.7. This was the last version to run on PHP4.
- Note that many ISPs offer both PHP4 and PHP5. You often need to edit a configuration file or use a control panel to switch between them.
- Check whether the PDO database driver is available on your server. From the "PHP Information" link on your admin page, look for a section called PDO. You should see "PDO Enabled", and a driver for the database you intend to use. Check with your web host if you are unsure.
- While reviewing the PHP Information, also check your available memory allocation. PhpGedView requires at a minimum of 32mb of allocatable RAM for small GEDCOMs and is happy to consume much more, depending upon the size of your GEDCOM. 64mb of allocatable memory is a recommended base level.
- If your site allows other users to make online edits, you should temporarily disable them in the gedcom configuration page. (To do this in 4.1.x, use the "Admin" link at top of page -> "Manage GEDCOMs and edit Privacy" -> click "edit" on the "Configuration file" line -> "Edit Options" -> "Enable online editing" -> set to "No").
- Accept or reject any pending GEDCOM edits. (There is a link for doing this in the page header/footer.)
- Make sure that gedcom files in your index directory are up-to-date. If you have enabled "sync changes to gedcom file" in your gedcom configuration, then they should be up-to-date. (To check this in 4.1.x, go: "Admin" link at top of page -> "Manage GEDCOMs and edit Privacy" -> click "edit" on the "Configuration file" line -> "Edit Options" -> "Synchronize edits into GEDCOM file" -> check this field is set to "Yes".) However discrepancies can creep in over time, and it is recommended to update it anyway.
- In PhpGedView version 4.1 and earlier, you should use the download-gedcom option, and then copy the file back to the server. (To do this, use "Admin" link at top of page -> Manage GEDCOMs and edit Privacy -> click "download" on the "GEDCOM file" line -> select "GEDCOM" under "Choose File Type", untick "Remove custom PGV tags? (eg. _PGVU, _THUM)", tick "Zip File(s)" -> click "download now".)
- In PhpGedView version 4.2 and later, you can use the export option from the manage gedcoms page to achieve the same thing more quickly.
- If you are using custom themes, check with the theme author to find out whether it is compatible with the version of PhpGedView you are installing. If it is not, or you don't know, use the user administration page to change all users to one of the standard themes.
- If you have customised any of the PHP scripts to change the behaviour of PhpGedView, you should make preparations to implement the same customisations on your new installation.
- Make a backup copy of your database. This step is optional, and should only be required if, during your upgrade process, something goes wrong. There are several ways to do this, depending on your server configuration:
- simply make a copy of the database file.
- If you run your own server, make a copy of the raw database files.
- If you have access to the phpMyAdmin tool, it offers an SQL export facility.
- An export utility is available from the patches tracker which can export/import your database tables to files in your index directory.
- Make a backup copy of the configuration files and data directories on your server.
- Your configuration file: /config.php
- Your media directory and its contents: /media
- Your index directory and its contents: /index
- Any local translations: /languages/extra.XX.php
- The configuration files of any modules that you use: /modules/XXXXX/config.php
- Make another backup. Upgrade problems can always be repaired - but only if you have a backup!
- click the "Logout" link at the top of the page.
Obtaining the latest distribution
Download the appropriate .zip file from sourceforge.net and extract the contents of it to your desktop computer.
There are two current versions available:
- the full version (e.g. PhpGedView-all-X.Y.Z.zip) which contains all the languages, all the themes and all the optional modules.
- the basic version (e.g. PhpGedView-basic.X.Y.Z.zip) which contains just the major languages, the most popular themes and no optional modules.
If you downloaded the full version, you should delete any modules/languages/themes that you don't use. If you downloaded the basic version, you may also download any of the optional modules/languages/themes that you want.
- Languages are stored in the /languages/ directory. Add/remove complete sets of language files, such as *.XX.php.
- Modules are stored in the /modules/ directory. Add/remove sub-directories, together with the corresponding .php file of the same name.
- Themes are stored in the /themes/ directory. Add/remove complete sub-directories.
You may choose a different combination of modules/languages/themes to the one in your current installation. Should you need an earlier version of phpGedView. most previous stable releases are listed below these current versions.
It is generally simpler to download the full version and delete rather than download the basic version and add to it. However, if you have slow/limited internet connectivity, you may want to start with the basic version and add to it.
Preparing the distribution files
Since we are upgrading an existing installation, we want to keep the existing files on the server. Delete the following files and directories from the upgrade package, from sourceforge, before you upload them. You don't want to overwrite your files.
- The file /config.php
- The directory /index/ and all its contents
- The directory /media/ and all its contents
Note: The following files and directories will be included from Sourceforge. These are only needed when setting up a new installation and contain default values.
Clean up the current files on the server
Delete all the files/directories on your server except the following:
- The application configuration file: /config.php
- Any local function customisation file: /includes/functions.extra.php
- The application data directory: /index/
- Any local language file customisations: /languages/extra.XX.php
- Any local language event history customisations: /languages/histo.XX.php
- The multi-media storage directory: /media/
- Any 3rd party module specific files: /modules/XXX.php
- Any module configuration files: /modules/XXX/config.php
This is the reverse of the files you deleted in the previous step.
Delete the following directory on your server, and all its contents. PhpGedView will recreate it when it needs it.
Delete the following file on your server. PhpGedView will recreate it when it needs it.
Copy the new distribution files to the server
Copy all the distribution files you prepared in the previous step to your server. This will replace the ones you just deleted.
Re-import Gedcom Data
If you have performed a major upgrade (e.g. 4.1.x to 4.2.x) you will be required to reimport your gedcom files. If you have performed a minor upgrade (e.g. 4.2.x to 4.2.y) this step is optional.
Log in to the server as a site administrator. Go to the manage gedcom page, if you are not automatically redirected there.
Import each gedcom in turn by selecting the "import" option and following the instructions. If these gedcoms were created by PGV and contain media files, upon reimport, select "NO" to the question of 'keep media links'. Failure to do so will cause duplicate media links and media to appear to be unlinked to your individuals, families and sources.
Briefly check the major functions areas;
- individual and family details
- modules such as googlemaps or research-assistant
Upgrade problems tend to result in complete success or complete failure. If there are no obvious errors, you should be fine.
Post Installation Steps
- Re-enable online editing, if you disabled it earlier