Installing PhpGedView for Development

From PGVWiki
Revision as of 18:11, 16 May 2010 by Momse (talk | contribs) (→‎Setting up a virtual directory)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Setup

Make sure that you have followed the instructions in the following documents before continuing:

Setting up a virtual directory

When developing, it is very convenient to be able to test immediately the code that you are developing. The easiest way to enable this is to setup a virtual directory which points to the location where you checked out the PhpGedView project files.

Setting up a virtual directory in IIS

  1. Open the Internet Information Services manager
    1. Control Panel->Administrative Service->Internet Information Services
  2. Expand the sites until you get to the Default Web Site. You should see something similar to the following image:Clipboard02.png
  3. Right-click on the Default Web Site option and select the New->Virtual Directory option from the context menu. This will open the Virtual Directory Creation Wizard. Click Next to get started.
  4. In the Alias field, enter the name you want to use to access your PhpGedView installation. PGV is a good choice. This will allow you to access your site using a url like http://localhost/PGV/
  5. In the Directory field, browse to your project directory in your Eclipse workspace.
    1. To find where you Eclipse workspace is located, in Eclipse choose the File->Switch Workspace menu option. The window that pops up will show you the path to your Eclipse workspace.
  6. On the Access Permissions screen make sure that the Read, Run Scripts, Execute, and Write options are checked. Click Finish.
  7. Add index.php to the default documents list
    1. Right-click on the new Virtual Directory and select "Properties" from the context menu
    2. Switch to the "Documents" tab and add "index.php" to the list of default documents.
  8. Next you will need to set the proper file permissions for the index directory. The index directory is a directory that must be writable by the application where it will store configuration files.
    1. In a windows explorer window, browse to your workspace folder.
    2. Right-click on the index directory and select properties. Then select the Security tab.
    3. Give the Users group or the Everyone group full control
  9. Repeat the permissions steps for the config.php file and the media directory
  10. You may now begin configuring PGV by opening a browser and going to the URL http://localhost/PGV/ This will bring up the main PGV configuration screen.
  11. If you get any errors saying Permission denied opening stream FILE_PATH where FILE_PATH is the path to a file, then you will need to set some more permissions. This is strange setting in the way that your computer has been configured. Follow these steps to get around it:
    1. Right click on the includes directory, select properties, and go to the security tab.
    2. Make sure that the Users group or Everyone group has read and execute permissions
    3. Then click the Advanced button.
    4. Check the option Replace permission entries... and click Ok.
    5. For every permission denied error, repeat the steps above on the containing folder. You will likely need to do this for the following directories: languages, themes, webservice, includes/SOAP, includes/db
    6. When you have no more errors then you can continue configuring

Setting up a virtual directory in Apache 2

  1. Open the httpd.conf file for your Apache web server
  2. Scroll to the bottom of the file and add the following block of code (changing the relevent paths of course). Then restart the server.
Alias /pgv 	"C:/phpGedView/workspace/future/"
<Directory "C:/phpGedView/workspace/future/">
       Options Indexes FollowSymLinks MultiViews ExecCGI
       AllowOverride All
       Order allow,deny
       Allow from all
</Directory>


You will also need to find the line as follows:

DirectoryIndex index.html index.html.var

add index.php to the end of the line so that it looks like this:

DirectoryIndex index.html index.html.var index.php

Configuring PhpGedView

  1. Copy config.dist to config.php
  2. Open the URL http://localhost/PGV/ in a web browser
  3. In the Database Username field enter the username root (unless you specified a different user for MySQL)
  4. Leave the password field blank (unless you specified a password when configuring MySQL)
  5. Leave all of the other options as their default settings and click the Save configuration button
  6. Next you will be asked to create an administrative user for your PGV site. Fill in all of the fields and click the add user button. Click on the Manage Gedcoms link.
  7. You will now be asked to either create a new GEDCOM or Upload one.
  8. You can download a GEDCOM of the presidents of the United States and upload it into your site using the Upload GEDCOM link.
    1. You can also get a ZIP file of some of the media included in that presidents GEDCOM.
    2. In the Upload path option, select the Browse button and choose the GEDCOM file that you want to upload.
    3. Fill in an Optional title from your GEDCOM and change any of the desired settings. Then click the Save configuration button. The defaults are fine for most options.
  9. You can also start from scratch and enter your own data by selecting the Create a New GEDCOM link.
    1. In the Path and name... field, enter a file name for your GEDCOM with a .ged extension (e.g. test.ged or myfamily.ged).
    2. Fill in an Optional title for your GEDCOM and change any of the desired settings. Then click the Save configuration button. The defaults are fine for most options.
  10. After you have uploaded or created a gedcom file, you will be taken to the page to import the GEDCOM file into the database. Keep pressing the Continue button until you get a page saying that the import was complete.
  11. On the right-hand side of the page you will see several links. Click on the link to go to the pedigree chart to begin seeing the data.