duanbiaojin8860 2015-09-25 12:11
浏览 40

PHP在一台服务器上工作但在另一台服

I am migrating wordpress website from JustHost server to VPS (Debian 8). I have successfully installed wordpress and all pages are working fine except homepage which is blank and the only page that has different template. I have enabled debugging and I'm getting error:

Parse error: syntax error, unexpected '<' in /var/www/wp-content/themes/goldistra/front-page-presentation.php on line 19

There is obviously no error as the site is working fine on the first server.

When I remove code from line 13 to 19 in that php file, site finally shows up but it is still broken as the slideshow gallery is not opening images, twitter widget is not working and footer is not showing up.

Here is code sample from line 13-19:

 <?php/* if ( get_option('fppre_intro_heading') != '' ): ?>
                <h1><?php echo get_option('fppre_intro_heading'); ?></h1>
            <?php endif; ?>
            <?php if ( get_option('fppre_intro_text') != '' ): ?>
                <p><?php echo get_option('fppre_intro_text'); ?></p>
            <?php endif; 
            <h1><?php echo $post->post_title; ?></h1>*/?>

And here are some server infos:

1. First (working) server

    Date:   Fri, 25 Sep 2015 11:53:32 GMT   
    Server: Apache  
    Vary:   Accept-Encoding,Cookie,User-Agent   
    Cache-Control:  max-age=3, must-revalidate  
    WP-Super-Cache: Served supercache file from PHP 
    Content-Encoding:   gzip    
    Content-Length: 7165    
    Cache-Control:  max-age=3600    
    Expires:    Fri, 25 Sep 2015 12:53:32 GMT   
    Connection: close   
    Content-Type:   text/html; charset=UTF-8

2. VPS

Date:   Fri, 25 Sep 2015 12:06:00 GMT   
    Server: Apache/2.4.10 (Debian)  
    X-Pingback: http://151.236.10.228/xmlrpc.php    
    Link:   <http://151.236.10.228/>; rel=shortlink 
    Vary:   Accept-Encoding 
    Content-Encoding:   gzip    
    Content-Length: 350 
    Connection: close   
    Content-Type:   text/html; charset=UTF-8

I am using PHP version 5.6.13 on my VPS

  • 写回答

2条回答 默认 最新

  • doushou9028 2015-09-25 12:19
    关注

    You've missed a close php tag in line 18. That's why you get the error for line 19.

    Also, you shouldn't use PHP comments in a php tag that encloses other PHP tags. Use HTML commenting instead, if you'd like to comment out multiple HTML elements at once.

    评论

报告相同问题?

悬赏问题

  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?