From 6b83da54ce9ed9b7a2c90c7a9581aac648755c41 Mon Sep 17 00:00:00 2001 From: gggeek Date: Sat, 1 Jul 2017 16:19:58 +0100 Subject: [PATCH] test fixing php 7.1 on travis --- .travis.yml | 4 +++- test/ci/travis/setup_apache.sh | 2 +- test/ci/travis/setup_apache_hhvm.sh | 2 +- test/ci/travis/setup_php_fpm.sh | 5 ++++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9fcb4a6..ca0fb3a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ install: before_script: # Disable xdebug. NB: this should NOT be done for hhvm... - - if [ $TRAVIS_PHP_VERSION != "hhvm" ]; then phpenv config-rm xdebug.ini; fi + - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini; fi # Set up Apache and Privoxy instances inside the Travis VM and use them for testing against @@ -33,6 +33,8 @@ before_script: - ./test/ci/travis/setup_privoxy.sh script: + # Travis currently compiles PHP with an oldish cURL/GnuTLS combination; + # to make the tests pass when Apache has a bogus SSL cert whe need the full set of options below php -d "include_path=.:./lib:./test" test/testsuite.php LOCALSERVER=localhost URI=/demo/server/server.php HTTPSSERVER=localhost HTTPSURI=/demo/server/server.php PROXY=localhost:8080 HTTPSVERIFYHOST=0 HTTPSIGNOREPEER=1 SSLVERSION=3 after_failure: diff --git a/test/ci/travis/setup_apache.sh b/test/ci/travis/setup_apache.sh index b9d2465..c6c957a 100755 --- a/test/ci/travis/setup_apache.sh +++ b/test/ci/travis/setup_apache.sh @@ -6,7 +6,7 @@ sudo a2enmod rewrite actions fastcgi alias ssl # configure apache virtual hosts -sudo a2dissite 000-default.conf +#sudo a2dissite 000-default.conf sudo cp -f test/ci/travis/apache_vhost /etc/apache2/sites-available/default sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default sudo service apache2 restart diff --git a/test/ci/travis/setup_apache_hhvm.sh b/test/ci/travis/setup_apache_hhvm.sh index 76dbef8..b764915 100755 --- a/test/ci/travis/setup_apache_hhvm.sh +++ b/test/ci/travis/setup_apache_hhvm.sh @@ -6,7 +6,7 @@ sudo a2enmod rewrite actions fastcgi alias ssl # configure apache virtual hosts -sudo a2dissite 000-default.conf +#sudo a2dissite 000-default.conf sudo cp -f test/ci/travis/apache_vhost_hhvm /etc/apache2/sites-available/default sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default sudo service apache2 restart diff --git a/test/ci/travis/setup_php_fpm.sh b/test/ci/travis/setup_php_fpm.sh index e9ad9c6..58bdc14 100755 --- a/test/ci/travis/setup_php_fpm.sh +++ b/test/ci/travis/setup_php_fpm.sh @@ -6,10 +6,13 @@ sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.ph if [ "$TRAVIS_PHP_VERSION" = "7.0" -a -n "$(ls -A ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d)" ]; then sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf fi +if [ "$TRAVIS_PHP_VERSION" = "7.1" -a -n "$(ls -A ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d)" ]; then + sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf +fi -# NB: the following does not seem to work with php 5.3... echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini echo "always_populate_raw_post_data = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini +# NB: the following does not seem to work with php 5.3... echo "include_path = '.:$(pwd)/lib'" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm -- 2.43.0