diff --git a/.travis.yml b/.travis.yml
index e55bf3ffd04abe0e7354501ea463e0ada25f2d84..ab0bdf17feb21c246ef291cacbb54b93d4b94ce0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -62,7 +62,7 @@ before_install:
 
 install: true
 before_script:
-  - if [ "$BINDINGS" == "php" ]; then phpenv config-add src/bindings/php/hammer.ini; fi
+  - if [ "$BINDINGS" == "php" ]; then phpenv exec php-config; phpenv config-add src/bindings/php/hammer.ini; fi
 script: 
   - scons bindings=$BINDINGS test
 notifications: