diff --git a/checkmk/custom-files/php_fpm_pools b/checkmk/custom-files/php_fpm_pools
index a48650a74d0aca24bad23f9c6c968214a3207426..d5f12dfb7af93f708ecad7c5e2ddfbee2015f9bc 100644
--- a/checkmk/custom-files/php_fpm_pools
+++ b/checkmk/custom-files/php_fpm_pools
@@ -137,7 +137,7 @@ config_file=os.path.join(os.environ.get("MK_CONFDIR", "/etc/check_mk"), "php_fpm
 php_fpm = None
 
 if os.path.exists(config_file):
-    execfile(config_file)
+    exec(open(config_file).read())
 
 if not php_fpm:
     print("Config file does not exist or is empty!")