wangjunbao/smt2

short_open_tag = On required

Closed this issue · 3 comments

What steps will reproduce the problem?
1. Install with short_open_tag = Off
2. Try to login

What is the expected output? What do you see instead?
Expected to login, instead the URL showed: 
http://localhost/smt2/<?=ADMIN_PATH?>sys/login.php

What version of the product are you using? On what operating system?
2.0.2, Windows XP, PHP 5.3.8, MySQL 5.5

Please provide any additional information below.
You need to change <?= to <?php print.  PHP comes with short_open_tag = Off by 
default.

PHP ini description:
; Allow the <? tag.  Otherwise, only <?php and <script> tags are recognized.
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable code,
; be sure not to use short tags.

If a user does not have easy access to modify their php.ini, this could be a 
huge roadblock for them.  Why not make it easy to install for everybody?

Original issue reported on code.google.com by johnatha...@gmail.com on 21 Oct 2011 at 3:47

I know... The directive short_open_tag changed to "0" in PHP > 5.3.0.
I will update it in the next release. By now, if you don't have access to your 
php.ini, just add `ini_set("short_open_tag", "1")` at the begining of your 
`admin/sys/functions.php` file.

Original comment by luis.lei...@gmail.com on 21 Oct 2011 at 4:09

  • Changed state: Accepted
This issue was closed by revision r77.

Original comment by luis.lei...@gmail.com on 23 Nov 2011 at 7:25

  • Changed state: Fixed
Committed changes to SVN. Please confirm that it worked.

Original comment by luis.lei...@gmail.com on 23 Nov 2011 at 7:26