Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

Add script php

Avatar

Level 1

Hello everyone,

I hope you are well.
We recently created a site with Adobe Experience Manager.
We would like to create a form and we have created the PHP script, but we don't know how to add it to Adobe Experience Manager.
In the template, we use the EmbeededContentIframe component, and can only add two types of content:
1/ iframeendpoint (link to the PHP)
2/ iframe script

The question is, is it possible to put the PHP code in Adobe Experience Manager (example: in assets and call it after)? 
Or how can we proceed if we don't want to put it on another server?

Sincerely,

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi @RutchyRa

you cannot directly run server-side PHP code because AEM is a Java-based CMS running on Java Servlet containers. PHP scripts must be executed by a PHP-enabled web server, which AEM itself does not support. 

 

I recommend rewriting the form using AEM Forms or Java Backend: 

  • Develop the form within AEM using AEM Forms, which are specifically designed for form management, validation, and submission.
  • AEM supports server-side form processing through Java servlets, Sling servlets, or integrated form handlers. This method eliminates the need for a separate PHP server, while providing full support within the AEM form ecosystem.
 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 9

Hi @RutchyRa

you cannot directly run server-side PHP code because AEM is a Java-based CMS running on Java Servlet containers. PHP scripts must be executed by a PHP-enabled web server, which AEM itself does not support. 

 

I recommend rewriting the form using AEM Forms or Java Backend: 

  • Develop the form within AEM using AEM Forms, which are specifically designed for form management, validation, and submission.
  • AEM supports server-side form processing through Java servlets, Sling servlets, or integrated form handlers. This method eliminates the need for a separate PHP server, while providing full support within the AEM form ecosystem.