Allow short form of PHP’s open tag
November 26, 2009 | linux, otherauthor: Karol Zielinski | comments: 2 | views: 2131
Tags: php, php-fpm, short form
So easy, right? Yes, of course. However I forgot about it. That’s why RSS feeds to two of my blogs (this one and blog.karolzielinski.com) didn’t work for a while. Ehhh… fixed. Now, I will describe how to allow this form.
So… I moved from php on apache + nginx to php-fpm + nginx and I forgot about short form of PHP’s open tag. I did some reasearch and… what I had to do is:
change value of variable short_open_tag to On.
Find a line with “short_open_tag = Off” and change it to “short_open_tag = On” (or add this line if you don’t have it).
Open php-fpm.conf (it’s propably under /usr/local/etc/php-fpm.conf) and add:
<value name="short_open_tag">On</value>
under <value name=”php_defines” />
That’s all. Restart your apache or php-fpm.
By the way… more informations about this variable on php.net
Hello, I'm Karol Zielinski, internet evangelist, an entrepreneur, project manager and a web developer from Gdynia, Poland. I like creative design, good advertisement, social media and all kind of stuff around the web.
November 27, 2009, 1:36 am
Its considered dangerous to use the short open tak. And the it is removed per 5.3
June 22, 2010, 10:54 am
Its considered dangerous to use the short open tak. And the it is removed per 5.3
How is it dangerous?
And from what I have been reading, it is set to be defaulted to “Off” but it is not going to be removed. PHP6 there is still debate, but it seems like it will be around even in PHP6′s time.