Running local PHP file in 1.8.1 Docker

Hi,

When I was using the CMS +XAMPP before 1.8.1+Docker, I could insert local php files into a layout via the “web page” option. Now when I try and do this, they can’t be displayed.

Can anyone explain to me how to run local php files in the layout please? Before the web server in XAMPP would power the PHP but obviously Docker is different…

I don’t think it should be any different in 1.8, perhaps try embedding them in an iframe with fully qualified path to the file?

Still not working, I am playing around with a few different ways but it definitely doesn’t play the same as I had it in 1.7.6. Cheers

I think the difference is that I’m using Docker. The location where I should have the PHP file (so the docker web server linked with xibo can run it) is the problem.

You should put your PHP files in

shared/cms/web/userscripts

That directory is then available as /userscripts on the Docker webserver.

So for example, the file shared/cms/web/userscripts/test.php would be available to you as http://server.example.org/userscripts/test.php

This is covered in the manual here:
http://xibo.org.uk/manual-tempel/en/install_custom_content.html

1 Like