How can I use php inside a confluence page

Daniel Schulz November 26, 2019

Hello Community,

is there a solution to the problem? I read the article and unfortunately only the iFrame works for me. But I would like to include the php script directly on the Confluence page. I put the php script on the whitelist and followed the instructions. Unfortunately nothing is displayed on the Confluence page. Can anyone help me?

 

Thanks for help

Daniel

3 answers

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 27, 2019

What is not working?  Have you installed the module and checked the apache server can serve up php outside Confluence? 

What errors do you get when you try to view a page with php embedded in it?

Hagen Ermer November 28, 2019

Hi Nic, I'm a colleague of Daniel and working with him on that issue. We have installed the module and there is a running apache with php installed as well. We can't get php running, except in an iframe with an external adress which is whitelisted. And we need to get rid of the iFrame. I also looked for the home directory on the confluence-init.properties - file, which says it is /var/atlassian/application-data/confluence. I created a hello-world html file which I cannot access either, even when I access the server from our network via the ip-adress - that's one of he weird things. The confluence-init.properties file I found in /opt/atlassian/confluence/confluence. I tried several locations to access the pure html file and none of them led to success.

Hagen Ermer November 28, 2019

No matter if a *.php or *.html file, the error ist still the same 403 message...403.JPG

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 12, 2019

Sorry for the delay, I've been swamped.

If the html file does not work, then Apache is not configured to serve it up correctly.  I'm afraid I can't tell you how to fix that, I don't know what your config is.

0 votes
Daniel Schulz November 27, 2019

Thanks for your answer,
I know the article, unfortunately it doesn't work for me.

0 votes
Sven Schatter _Lively Apps_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 26, 2019

You might find this piece of documentation helpful.

EDIT: Or do you mean, you already followed these steps?

Hagen Ermer November 28, 2019

Yes, we followed these steps but aren't able to get the php file running locally

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events