PHP使用Nginx和FastCGI解析错误[重复]

This question already has an answer here:

I am using NGINX and PHP 5.6 and cannot seem to debug this error after an upgrade. My error log reads:

2015/12/29 11:57:56 [error] 928#0: 20485 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected '}' in /var/www/magento/htdocs/pub/become/wp-content/themes/become/index.php on line 81" while reading response header from upstream, client: 83.110.226.45, server: sss.uat...com, request: "GET /become/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/sss.uat.*..com.sock:", host: sss.uat.***..com"

And this is my PHP

<?
if($sss_article_featuretitle==""){?>
    <?php echo mb_strimwidth(the_title(), 0, 40, '...'); ?>
<?php } else { //line 81
    echo $sss_article_featuretitle;
}
?>

The PHP 5.6 docs and some searching does not say why this query is no obsolete.

</div>

Remove all excess open/close tags:

<?php
if ($sss_article_featuretitle=="") {
    echo mb_strimwidth(the_title(), 0, 40, '...');
} else {
    echo $sss_article_featuretitle;
}
?>

Update: Try to change it like this:

http://php.net/manual/en/language.basic-syntax.phpmode.php

<?php if ($sss_article_featuretitle==""): ?>
  <?php echo mb_strimwidth(the_title(), 0, 40, '...'); ?>
<?php else: ?>
  <?php  echo $sss_article_featuretitle; ?>
<?php endif; ?>

Also make sure you don't use short open tag <?, which is not a good practice and is probably disabled in PHP settings, so should be turned on by short_open_tag directive in your php.ini file.

http://php.net/manual/en/language.basic-syntax.phptags.php

Check that you have short_open_tags enabled. It looks like that first PHP part is } else {. I think that it was maybe removed in PHP 5.6 or at least deprecated.

Can you upload phpinfo somewhere?