2.4.8 Install Not Working when I add PHP code to the page


#1

I followed the guides to install and everything worked great (index.php) until added the following piece of PHP to the page. Once I add this and login to edit the page it loads with the exception of the code below (I know because the image don’t load) then after about 5 seconds it goes to the blue error page.

What am I doing wrong? Previously this was an INCLUDE but that doesn’t work in 2.4.8 so I found another solution but it seems like any (including a basic variable) PHP I add to the page makes it crash. I don’t think the code below is the issue really but any thoughts would help.

I’ve checked permissions as well and set /sitecake and sitecake.php to 777.
Running Apache/PHP 7.0.31

<?php $xml = simplexml_load_file("./slider.xml") or die ("Error: Data Not Accessible"); $a = 0; while ($a < 5) { $image = $xml->group[$a]->image; $brand = $xml->group[$a]->brand; $model = $xml->group[$a]->model; $isactive = ""; if ($a == 1){ $isactive = "active"; } echo '
'; echo '...'; echo '
'; echo ''. $brand .' '. $model; echo '
'; $a++; } ?>

I can post links to the page if needed.
I’d like to make this work but it seems like it’s rather fragile CMS. I really hope it’s not but I can’t figure this one out.

HELP!!


#2

2.4.9 is coming out tomorrow and php includes are fixed.
Keep in mind that inside sc-content container any php code will be overwritten.


#3

YAY!!! Seriously happy about this. Can’t wait to test it out.


#4

@predragleka how do we get a copy of 2.4.9? I don’t see any obvious download link.


#5

Didn’t you receive update email?


#6

Hope, I checked my JUNK as well and don’t see it.