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

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.0 32 bit - Apache 2.4.43 - PHP 7.4.4/7.3.16/..../5.6.40 - MySQL 5.7.29 - MariaDB 10.4.12
Wampserver 3.2.0 64 bit - Apache 2.4.43 - PHP 7.4.4/7.3.16/..../5.6.40 - MySQL 5.7.29/8.0.19 - MariaDB 10.4.12
PhPMyadmin 5.0.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

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]

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.0 32 bit - Apache 2.4.43 - PHP 7.4.4/7.3.16/..../5.6.40 - MySQL 5.7.29 - MariaDB 10.4.12
Wampserver 3.2.0 64 bit - Apache 2.4.43 - PHP 7.4.4/7.3.16/..../5.6.40 - MySQL 5.7.29/8.0.19 - MariaDB 10.4.12
PhPMyadmin 5.0.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

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.