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
#6
RE: Short_open_tag - PHP Error 500
(02-27-2018, 05:40 AM)TGates Wrote: 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.


Realmente, é o que irei fazer, atalhos apenas pioram a situação a longo prazo.
Really, that's what I'll do, shortcuts only make things worse in the long run.

Obrigado...
Thanks...

PS:I tried to test in CWP, and it was the worst mistake. CWP is very limited.
That it stays registered to all the users of the future, do not migrate at least as it is to CWP.
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
RE: Short_open_tag - PHP Error 500 - by gabriel15959 - 02-27-2018, 09:07 AM

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

Forum Jump:


Users browsing this thread: 1 Guest(s)