Problem with executing PHP code

Hello,

I have installed Wordpress (CMS) on Ubuntu and a custom PHP code in one of its pages doesnt execute as it has to. Instead, the code as a whole is directly output to the browser.

7 Replies

That's a pretty vague problem, can you be more specific, where did you put this php code?

If you put it in the wordpress post/page content box then it won't be rendered.

Wordpress is installed on Ubuntu.

ExecPHP plugin is used to execute PHP code on one of the Wordpress pages.

The purpose of the plugin is to execute the code and output the browser.

Instead, it outputs the code to the webpage.

This plugin works fine on Wordpress installed on Red Hat Linux.

I hope this information helps :) .

A link to the offending page would be useful, also check your phpinfo() and see if eval is in the disabled functions list.

@kiranpvsr:

Instead, the code as a whole is directly output to the browser.
You probably use
Use

@obs:

see if eval is in the disabled functions list.
eval can't be disabled, is not function.

eval is function:

http://php.net/manual/en/function.eval.php

@waldo:

eval is function:

http://php.net/manual/en/function.eval.php
From this page:
> Note: Because this is a language construct and not a function, it cannot be called using variable functions
Also 'eval' can not be disabled in php.ini. Just check it.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct