![]() |
|
Short_open_tag - PHP Error 500 - Printable Version +- Sentora Support Forums (https://senforums.mach-hosting.com) +-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5) +--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32) +---- Forum: General Support Forum v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=36) +---- Thread: Short_open_tag - PHP Error 500 (/showthread.php?tid=4372) |
Short_open_tag - PHP Error 500 - gabriel15959 - 02-22-2018 I'm having trouble enabling short_open_tag in php.ini When I do this, it displays ERROR 500 PAGE I updated PHP 5.6 recently, could this be the drawback?
RE: Short_open_tag - PHP Error 500 - Me.B - 02-23-2018 likely. Are you using php-fpm ou mod_php? RE: Short_open_tag - PHP Error 500 - gabriel15959 - 02-23-2018 using PHP-FPM update for 5.6 with: http://forums.sentora.org/showthread.php?tid=780 but, after I updated the PHP for 5.5 with a toturial from the internet, where sentora and server displayed "php without dependencies needed" and written in php.ini "short_open_tag On" the page displayed ERROR 500 I believe that formatting is the best way... But hopefully by activating short_open_tag, it will work after that, at least it worked on ZPanel Sorry for english kkk RE: Short_open_tag - PHP Error 500 - Me.B - 02-27-2018 Hi, PHP-fpm is insecure with setup and you broke your setup. M B RE: Short_open_tag - PHP Error 500 - TGates - 02-27-2018 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. RE: Short_open_tag - PHP Error 500 - gabriel15959 - 02-27-2018 (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.) 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. |