Hello,
I tried to update a snippet that contained php code inside and after hitting update it converted the
<?php ?> code to html entities
Did expression engine disable php inside snippets, is there a way to enable it?
Please help!
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
September 13, 2011 8:53am
Subscribe [2]#1 / Sep 13, 2011 8:53am
Hello,
I tried to update a snippet that contained php code inside and after hitting update it converted the
<?php ?> code to html entities
Did expression engine disable php inside snippets, is there a way to enable it?
Please help!
#2 / Sep 13, 2011 3:43pm
Hi Panos S.,
Do you have PHP parsing on in the template you’re including the snippet in? You’ll need to for this to work.
#3 / Sep 13, 2011 3:52pm
Hello Lisa,
thank you for your reply. I have indeed enabled PHP parsing on the template and the same php code works perfectly if I copy and paste it inside the template instead of using snippets. In fact that’s what I am doing right now since I couldn’t save the snippet properly.
I’m sending you two screenshots demonstrating the problem. The first is before I hit ‘update’ and the other after I do.
#4 / Sep 13, 2011 4:21pm
Interesting. What version of EE are you currently on? And are you running any third-party modules, such as Mount-ee?
#5 / Sep 13, 2011 4:31pm
Lisa,
I’m on ee v2.2.2 - Build: date 20110801
I’m sending you a list of modules I’m using on this particular site.
#6 / Sep 13, 2011 4:33pm
Are you able to save other things with < in it? such as <html>?
#7 / Sep 14, 2011 6:45am
I’m afraid not. It does the same thing with <html> as well.
#8 / Sep 14, 2011 7:40pm
Hi, Panos,
You should have an email shortly. Thank you!
#9 / Sep 19, 2011 5:56pm
Hi Panos,
Just wanted to check in to see if you were able to respond to Lisa’s email. We’re here to help when you’re ready!
#10 / Sep 21, 2011 3:45pm
Checking in again to see if you still need our assistance, Panos. If we don’t hear back within a few days, we’ll assume you were able to get everything squared away, and we’ll close this thread up.
#11 / Sep 23, 2011 4:13pm
Panos, if you still need help with this, please feel free to open up a new thread by clicking the button below. Thanks!
#12 / Oct 23, 2011 1:53pm
Reopened at Panos’ request.
#13 / Oct 24, 2011 5:39pm
Hi, Panos,
This is fascinating.
I tried these:
<html>
<html
<html
<ht
<h
<
< >and it happened only with the ones that included html. Same with body.
So it looks like on form submission it may be looking for HTML/PHP and encoding it.
Can you check with your host to see if you’re running anything like mod_security or other server-side security measures that evaluate form submissions?
Thanks!
#14 / Oct 24, 2011 5:47pm
Just as a further observation, this happens with your templates as well. See site/ellislab-test. Definitely looking more and more like server-side security.
#15 / Oct 28, 2011 12:49pm
Lisa thank you for your reply,
I contacted mediatemple’s support, and they replied to me this morning that they haven’t made any updates to their security settings or any other changes to apache or php. Is there a specific parameter (php, apache, mysql) that could cause this behaviour?