diff --git a/.travis.yml b/.travis.yml
index 616bd7d4db..d6c23da993 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,7 +23,8 @@ before_script:
- phpenv rehash
- cd phpBB
- php ../composer.phar install --dev
- - cd ../
+ - cd ..
+ - sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi"
script:
- phpunit --configuration travis/phpunit-$DB-travis.xml
diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml
index f5f1aa2417..2d6af0e2ac 100644
--- a/travis/phpunit-mysql-travis.xml
+++ b/travis/phpunit-mysql-travis.xml
@@ -17,7 +17,7 @@
tests/functional
- ../tests/functional
+ ../tests/functional
@@ -36,5 +36,6 @@
+
diff --git a/travis/phpunit-postgres-travis.xml b/travis/phpunit-postgres-travis.xml
index a202ec4a36..a9062efafb 100644
--- a/travis/phpunit-postgres-travis.xml
+++ b/travis/phpunit-postgres-travis.xml
@@ -17,7 +17,7 @@
tests/functional
- ../tests/functional
+ ../tests/functional
@@ -38,5 +38,6 @@
+
diff --git a/travis/setup-webserver.sh b/travis/setup-webserver.sh
new file mode 100755
index 0000000000..beb04b0fef
--- /dev/null
+++ b/travis/setup-webserver.sh
@@ -0,0 +1,54 @@
+#!/bin/bash
+#
+# @copyright (c) 2013 phpBB Group
+# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+#
+set -e
+
+sudo apt-get update -qq
+sudo apt-get install -qq nginx realpath
+
+sudo service nginx stop
+
+DIR=$(dirname "$0")
+PHPBB_ROOT_PATH=$(realpath "$DIR/../phpBB")
+
+NGINX_CONF="/etc/nginx/sites-enabled/default"
+
+PHP_FPM_BIN="$HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/sbin/php-fpm"
+PHP_FPM_CONF="$DIR/php-fpm.conf"
+PHP_FPM_SOCK=$(realpath "$DIR")/php-fpm.sock
+
+USER=$(whoami)
+
+# php-fpm configuration
+echo "
+[global]
+
+[travis]
+user = $USER
+group = $USER
+listen = $PHP_FPM_SOCK
+pm = static
+pm.max_children = 2
+
+php_admin_value[memory_limit] = 128M
+" > $PHP_FPM_CONF
+
+# nginx configuration
+echo "
+server {
+ listen 80;
+ root $PHPBB_ROOT_PATH/;
+ index index.php index.html;
+
+ location ~ \.php$ {
+ fastcgi_pass unix:$PHP_FPM_SOCK;
+ include fastcgi_params;
+ }
+}
+" | sudo tee $NGINX_CONF > /dev/null
+
+# Start daemons
+sudo $PHP_FPM_BIN --fpm-config "$DIR/php-fpm.conf"
+sudo service nginx start