webmorph icon indicating copy to clipboard operation
webmorph copied to clipboard

Average and morph faces online http://webmorph.org/

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\�
      127.0.0.1 webmorph.test' /etc/hosts
      
      1. Update the httpd-vhosts.conf file (edit email and /path/to/webmorph below)
      sudo sed -i '' '$a\
      \
      <VirtualHost *:80>\
          ServerAdmin [email protected]\
          DocumentRoot "/path/to/webmorph"\
          ServerName webmorph.test\
          ErrorLog "/private/var/log/apache2/webmorph-error_log"\
          CustomLog "/private/var/log/apache2/webmorph-access_log" common\
      </VirtualHost>\
      \
      <IfModule mod_proxy.c>\
          ProxyRequests On\
          ProxyPreserveHost On\
          ProxyStatus On\
          ProxyPass /tomcat/ http://localhost:8080/\
          ProxyPassReverse /tomcat/ http://localhost:8080/\
      </IfModule>\
      \
      <Proxy *>\
          Require host localhost\
      </Proxy>' /etc/apache2/extra/httpd-vhosts.conf
      
      1. 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".
      2. Restart Apache
      sudo apachectl restart
      
    2. MySQL

      1. Install Homebrew
      ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      
      1. Install MariaDB (version of MySQL)
      brew install mariadb
      
      1. Set Mysql root user (edit password)
      mysqladmin -u root password 'mysecretpassword'
      
      1. 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