GGshow reloaded GGshow reloaded

August 7, 2013

PHP unexpected end of file

Issue:

  • Parse error: syntax error, unexpected end of file in ___ on line ___

Reason:

  • short_open_tags has been disabled in PHP configuration on the server.
  • Short form of PHP open tag (<? ?>) is not allowed.
  • PHP does not recognize code between short tag <? and ?>

Solution:

  • Avoid using short tag, replace short tag (<? and ?>) with full tag (<?php and ?>), and <?=… ?> with <?php echo …; ?>.

    or

  • For PHP v5.4.0 or newer
    Edit php.ini
    find
    short_open_tag = Off
    change it to:
    short_open_tag = On

    If short_open_tag is enabled, you will not be able to use JSAPI tag (<?js=…?>) or XML tag (<?xml … ?>) inline.
    You will be required to echo/print it with PHP, for example: <?php echo ‘<?xml version=”1.0″?>’; ?>.

More Info:

1 Comment »

No comments yet.

RSS feed for comments on this post.

Leave a comment

© 2017 GGSHOW | Powered by WordPress