Hi,
when I copy a index.php file to the htdocs folder with a simple test:
<?php
echo "test";
?>
it works fine with php 7.3. When I change the php version to any 5.x I only get a the text output and no execution of the php script. Where is the problem, any ideas?
My site: http://dernasenach.epizy.com
Currently php 5.4 activated
Welcome @Harray, sorry, I can’t answer your php question as to why the test didn’t work on php 5.4, and worked fine on a later version 7.3. Is there a reason you need to run 5.4 rather than the version that works for you, php 7.3?
I would think using a more recent version would be better. That statement could be showing my ignorance about php in general, but I’d think php 7.x would be better than php 5.x.
As replies come in I’ll learn more about it, and why running an earlier php version may be desired.
Hi @Steve2854,
php 7.3 should be definitly the choice, but I need to re run an old webpage made with an older version of cms silverstripe running under php 5.x, so I need the older php 5.x
I checked your website, and it seems that the issue is caused by your .htaccess file, not by PHP not working. When I renamed the .htaccess file, I got the expected output “test”. With the .htaccess file, I got completely different PHP code.
I don’t know enough about your .htaccess code, your website, or SilverStripe to say why this happens. All I know is that the issue is caused by one of those things.