unexpected '{'

Discussion in 'PHP' started by epic1231, May 7, 2009.

  1. #1
    Hey guys and gals, have a quick question, have this error code popping up

    Parse error: syntax error, unexpected '{' in /home/amate6/public_html/wtd/appinclude.php on line 16


    Figured it meant that a { was open or closed, but I don't see anything that is, the ones that are there are open and closed.. Can someone take a look and point me in the right direction

    
    <?php
    
    require_once 'this.php';
    
    //[todo: change the following url to your App API Key and APP Secret]
    $appapikey = 'deleted';
    $appsecret = 'deleted';
    
    $facebook = new Facebook($appapikey, $appsecret);
    $user = $facebook->require_login();
    
    $appcallbackurl = 'http://www.site';
    $appCanvasUrl = 'http://www.siteurl';
    
    
    	try {
            if (!$facebook->api_client->users_isAppAdded()) {
                $facebook->redirect($facebook->get_add_url());
            }
        }
        catch (Exception $excatch) {
            $facebook->set_user(null, null);
            $facebook->redirect($appcallbackurl);
        }
    
    Code (markup):

     
    epic1231, May 7, 2009 IP
  2. kusal

    kusal Peon

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Did you check the this.php for errors
     
    kusal, May 7, 2009 IP
  3. epic1231

    epic1231 Peon

    Messages:
    680
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks for the reply, was just looking into that.. and noticed on a developer forum (the this.php is from the sites client library) which runs in php5 -- both my servers run PHP Version 4.4.7 so I am assuming that maybe the problem...
     
    epic1231, May 7, 2009 IP
  4. epic1231

    epic1231 Peon

    Messages:
    680
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    just to update, that was the problem.. it was running on 4.4.7 and when I switched over to php5 it worked..
     
    epic1231, May 7, 2009 IP