PHP running on php-fpm question

Discussion in 'PHP' started by discuss4u, Jun 3, 2009.

  1. #1
    I am not sure if it is the best place for me to ask this.

    I am now exploring nginx + php-fpm as web server

    I found that php files start with <? cannot run properly.

    Yet, files are running properly if it starts with <?php

    But a lot of files in the servers start with <?

    So is there any way to solve the problem except change all the files?

    Thanks!
     
    discuss4u, Jun 3, 2009 IP
  2. crivion

    crivion Notable Member

    Messages:
    1,669
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    210
    Digital Goods:
    3
    #2
    go into php.ini and change short_tags = On or short_open_tags = On something like that
     
    crivion, Jun 4, 2009 IP
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #3
    Or, just search / replace the <? with <?php so that the files work without the ugly <? short-code tags.

    <? also gives you problems if you are presenting XML-content, and are not recommended. A search and replace on all files can be done automatically, on the server itself if you have shell access, and would permanently fix the problem.
     
    PoPSiCLe, Jun 4, 2009 IP