I set up a virtual server on Ubuntu 14, installed Apache + PHP5, if the code starts with

<?php 

, the page works. If it starts with

 <? 

that doesn't work.

Solution: http://php.net/manual/en/language.basic-syntax.phptags.php This will allow you to recognize the PHP code; tags as PHP source which should be processed as such. It is; generally recommended; it may be a problem; documents, however this remains supported for backward compatibility reasons. ; Note that this directive does not control the http://php.net/short-open-tag short_open_tag = ON

Closed due to the fact that the essence of the question is not clear to the participants Alex , PashaPash , Bald , Yuri Glushenkov , Streletz December 8, '15 at 5:03 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • What's the question? php scripts must start with <?php - Suvitruf
  • short_open_tag in php.ini included? - Suvitruf
  • one
    It is better to correct the scripts and not to use short_open_tag. Vulnerabilities in several CMS work only if this option is enabled. - Mike

2 answers 2

Read the specification .

php scripts must begin with <?php . Why did you decide that just with <? should they work?

To interpret the abbreviated tags:

 <? и ?> 

instead

 <?php и ?> 

It is necessary to enable the parameter in php.ini: short_open_tag = ON