php filter

Not applicable

I am using CKEditor in admin - structure block.In the Text Format drop down when i chose 'PHP code' option and save, nothing is displayed in the front end.But, when i check in the source code, it is displaying as So, what should i do to execute the php code successfully. Please find the screenshot attached.

Solved Solved
1 1 584
1 ACCEPTED SOLUTION

Not applicable

We have disabled (and, in cloud environments, entirely removed) the "PHP filter" module. It presents serious security risks, because it exposes all of Drupal's functionality and private data to anyone who is able to enter PHP code into content. All it takes is one misconfigured permission, and your entire codebase could be at risk. This module has disappeared entirely from Drupal 8 because the entire community agreed that it was a very bad idea.

If you need to add dynamically-generated text to a block, I suggest that you create a custom module to programmatically generate a block in PHP.

View solution in original post

1 REPLY 1

Not applicable

We have disabled (and, in cloud environments, entirely removed) the "PHP filter" module. It presents serious security risks, because it exposes all of Drupal's functionality and private data to anyone who is able to enter PHP code into content. All it takes is one misconfigured permission, and your entire codebase could be at risk. This module has disappeared entirely from Drupal 8 because the entire community agreed that it was a very bad idea.

If you need to add dynamically-generated text to a block, I suggest that you create a custom module to programmatically generate a block in PHP.