This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Short_open_tag - PHP Error 500
#5
RE: Short_open_tag - PHP Error 500
You should not enable short_open_tags for many reasons. One being an issue with using xml coding (which Sentora relies heavily on.)

Excerpt from: http://terrychay.com/article/short_open_tag.shtml
Code:
The real reason is simply that it violates valid XML markup to use short tags.
Simply put, let’s say you have an example where your PHP page has to generate a valid XML
file that needs a XML directive.

<?xml version="1.0" ?>

With short_open_tags, this will generate a fatal error in the PHP engine!
The workaround is to do something nasty like:
    
echo '<'.'?xml version="1.0" ?>';

(or some such). As more websites contained XHTML or some weird sort of sacrifice to the Gods of all
things XML (SOAP, XMLRPC, REST-XML), it was sooner convenient to admit defeat and just start coding
in valid XML markup.

It violates valid xml. It was not recommended for use because it isn’t guaranteed to be on everywhere.
Ever since then people have been in the habit of not using short tags just in case they are off.
Soon, it became part of the php.ini-recommended and short tags, like asp_tags and the alternative
syntax for control structures got relegated to the dustbin of history.

It would be better to update the scripts you are using to use normal php tags versus possibly compromising your server turning on short_open_tags.
Usually a simple process of find-and-replace has worked well for me in the past.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:


Messages In This Thread
Short_open_tag - PHP Error 500 - by gabriel15959 - 02-22-2018, 09:44 PM
RE: Short_open_tag - PHP Error 500 - by Me.B - 02-23-2018, 01:31 AM
RE: Short_open_tag - PHP Error 500 - by Me.B - 02-27-2018, 12:06 AM
RE: Short_open_tag - PHP Error 500 - by TGates - 02-27-2018, 05:40 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Repo update error hostingms 3 6 ,808 02-14-2024, 09:20 AM
Last Post: TGates
apt-get install mod_ssl ERROR CMs222 9 28 ,302 11-11-2022, 09:14 PM
Last Post: zustudios
Sentora debug and error files johnnyp 0 1 ,588 10-27-2022, 06:16 PM
Last Post: johnnyp

Forum Jump:


Users browsing this thread: 1 Guest(s)