Average and morph faces online
Branch: master
Clone or download
Latest commit a0f746f Jan 30, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
debug New apache resources and batch function updates Jan 29, 2018
include New apache resources and batch function updates Jan 29, 2018
resources New apache resources and batch function updates Jan 29, 2018
scripts New apache resources and batch function updates Jan 29, 2018
.gitignore Lots of cleanup Dec 11, 2017
LICENSE Create LICENSE Dec 4, 2017
README.md Updates for changing the URL from psychomorph.facelab.org to webmorph… Jan 12, 2016
admin.php fixed 3D obj demo files on new account creation Jan 27, 2018
index.php New interfaces for 3D objects, increased support for small screens, c… Feb 28, 2017
privacy.php first commit of code Dec 18, 2015
terms.php first commit of code Dec 18, 2015


# WebMorph

WebMorph is the online version of PsychoMorph, which was originally developed by Bernie Tiddeman. You can get the desktop version of PsychoMorph here http://users.aber.ac.uk/bpt/jpsychomorph/

WebMorph is developed by Lisa DeBruine at the Face Research Lab at the University of Glasgow.

## How to install WebMorph on a local server

1. Set up Apache/PHP/MySQL/Tomcat (instructions below for OS X)
   1. Apache/PHP
      1. Update the hosts file

        sudo sed -i '' '$a\ webmorph.test' /etc/hosts
      2. Update the httpd-vhosts.conf file (edit email and /path/to/webmorph below)

        sudo sed -i '' '$a\
        <VirtualHost *:80>\
            ServerAdmin email@email.org\
            DocumentRoot "/path/to/webmorph"\
            ServerName webmorph.test\
            ErrorLog "/private/var/log/apache2/webmorph-error_log"\
            CustomLog "/private/var/log/apache2/webmorph-access_log" common\
        <IfModule mod_proxy.c>\
            ProxyRequests On\
            ProxyPreserveHost On\
            ProxyStatus On\
            ProxyPass /tomcat/ http://localhost:8080/\
            ProxyPassReverse /tomcat/ http://localhost:8080/\
        <Proxy *>\
            Require host localhost\
        </Proxy>' /etc/apache2/extra/httpd-vhosts.conf
      3. Make sure PHP is on. Open the httpd.conf file in your favourite editor (e.g., `sudo nano /etc/apache2/httpd.conf`) 
         and remove preceding # from "#LoadModule php5_module libexec/apache2/libphp5.so".
      4. Restart Apache 
        sudo apachectl restart
   2. MySQL
	  1. Install Homebrew
	    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
	  2. Install MariaDB (version of MySQL)
	    brew install mariadb
	  3. Set Mysql root user (edit password) 
	    mysqladmin -u root password 'mysecretpassword'
	  4. Create database (update /path/to/webmorph below)
	    mysql -u root -p
        CREATE DATABASE psychomorph;
        USE psychomorph;
        \. /path/to/webmorph/resources/mysql/db.sql
        \. /path/to/webmorph/resources/mysql/tems.sql
   3. Tomcat
      1. Install Java JDK (1.8.x) ( http://www.oracle.com/technetwork/java/javase/downloads/ )
      2. Install Tomcat 7.0.x in /usr/local/ ( https://tomcat.apache.org/download-70.cgi )
         1. Link your tomcat folder to /usr/local/tomcat, make shell scripts executable, and start as _www user
            sudo ln -s /usr/local/apache-tomcat-7.0.54 /usr/local/tomcat
            sudo chmod +x /usr/local/tomcat/bin/*.sh
            sudo -u _www "/usr/local/tomcat/bin/startup.sh"'
2. Make a secure images folder (change /secure/path below to something outside your DocumentRoot

mkdir /secure/path/images
sudo chown _www /secure/path/images
sudo chmod 777 /secure/path/images