Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi all,

I did an upgrade on my Debian web server and stumbled with upgrade of apache2.2 to apache2.4. I had to replace
Code: Select all
Order allow,deny
Allow from all
with
Code: Select all
Require all granted
.

Most time I spend to find out "<? " is not longer supported from PHP5.6.
I have to replace it with "<?php ". This also affects couchcms: <?php echo COUCH::invoke(); ?>

Find out files with bad PHP start tag:
Code: Select all
grep -rin "<? " *.php


I hope you can save time...

Cheers,
Florian
Thanks for sharing the tips, Florian :)

It was never considered a good practice to use 'short open tag' in PHP (none of the core Couch files uses it).

That said, I think you are confusing 'short echo tag' with 'short open tag' when you mentioned the following statement -
Code: Select all
<?php echo COUCH::invoke(); ?>

'short echo tag' looks like '<?=' and is equivalent to '<?php echo' e.g.
<?= $var ?> is the equivalent of <?php echo $var; ?>

whereas 'short open tag' is simply '<?' which is equal to '<?php'.

Using 'short echo tag' is a handy shortcut for outputting values and, as opposed to 'short open tag', was never frowned upon to use. In fact, according to official PHP docs, it is now always enabled in PHP 5.4.0 and later (http://php.net/manual/en/language.basic ... hpmode.php).
2 posts Page 1 of 1