Interchange generating 403 errors on php files

Hi there,

Our Wordpress site has started generating 403 permission errors on the php files that Foundation’s Interchange is being asked to load. It’s been working fine for years but only started generating the 403 errors this morning. Our host support guys say they aren’t blocking it at their end and the files / folders in question all have the correct file permissions. I’m left completely stumped.

Images and test .html files are loading fine through Interchange - this only affects .php files.

I’m able to recreate the 403 errors with the following test code :

<div data-interchange="[<?php echo get_template_directory_uri().'/test/mod-test-mobile.php';?>, small], [<?php echo get_template_directory_uri().'/test/mod-test-tablet.php';?>, medium], [<?php echo get_template_directory_uri().'/test/mod-test-desktop.php';?>, large]">
		<!-- testing interchange on loading php -->
</div>

However, this works fine :

<div data-interchange="[<?php echo get_template_directory_uri().'/test/plain-mobile.html';?>, small], [<?php echo get_template_directory_uri().'/test/plain-tablet.html';?>, medium], [<?php echo get_template_directory_uri().'/test/plain-desktop.html';?>, large]">
		<!-- testing interchange on plain html files rather than php -->
</div>

Does anyone know what might be causing Interchange to have started being hit with 403 permissions errors when loading php files and how I might fix it? I’m at a complete loss.

Thanks.

Ok so the problem was tracked down to an overnight update in Cloudways application settings in which they’ve introduced a new setting which disableds direct php access on default. This was within the Applicaiton > Applicaiton Settings > “Direct access to php files” (switch to enable) and bingo.