Short open code converts to comments
Posted by: sunco (---.prod-infinitum.com.mx)
Date: March 02, 2020 02:57AM

I have wampserver 3.2.0 and for some compatibility with an old code I need to use Php 5.6.40

All fine, works great

The only issue is that the code uses short open tags and when apache/php reads them, it converts to html comments

I want to display a warning/error instead

Not an option to just replace short open tags with long tags. Really need to stop the script or at least warning/error

Options: ReplyQuote
Re: Short open code converts to comments
Posted by: Otomatic (Moderator)
Date: March 02, 2020 09:32AM

Hi,

You didn't have the idea to look at the PHP settings!

Left-Click -> PHP -> PHP Settings

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Short open code converts to comments
Posted by: sunco (---.prod-infinitum.com.mx)
Date: March 02, 2020 02:52PM

That’s exactly why I ask here instead of Stackoverflow, to avoid generic/non sense answers

I think already watch for every single one option. I just missed the right one

Maybe my english isn’t that good and my question is not clear

Options: ReplyQuote
Re: Short open code converts to comments
Posted by: Otomatic (Moderator)
Date: March 02, 2020 03:29PM

Hi,

There are "short_open_tag = On" or "short_open_tag=Off" directives, but there is no "short_open_tag=Warning" directive.

I'm afraid that what you're asking is not possible in a simple way.

Maybe with xdebug and its parameters, possibly see the xdebug documentation: [xdebug.org]

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Short open code converts to comments
Posted by: sunco (---.prod-infinitum.com.mx)
Date: March 02, 2020 03:37PM

The other option will then be to avoid convert that short open tags to html comments

Options: ReplyQuote


Sorry, only registered users may post in this forum.