I am getting an unpleasant Parse error and I am kinda a newb so I don't know how to get rid of it. >_<

details.php
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /mounted-storage/home34a/sub002/sc28495-PFEP/www/trackerx/details.php on line 15

And this is what's on line 15 in details.php
ob_start('ob_gzhandler');

download.php
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /mounted-storage/home34a/sub002/sc28495-PFEP/www/trackerx/download.php on line 11

And on that line we find..
$info_hash = (string)$_GET['info_hash'];

    Probably an earlier line has a missing semicolon, in both cases.

    The line number in the parse error is a guide only; it indicates where PHP found the parse error, not the line which caused it.

    Mark

      Download.php
      <?php
      require_once("config.php");
      // Load and Start IPB SDK
      require_once "ipbsdk_class.inc.php";
      $SDK =& new IPBSDK();

      if ($SDK->is_loggedin()) {
      // Code for logged in users goes here
      echo '

      $info_hash = (string)$_GET['info_hash'];

      Details.php

      <?php
      require_once("config.php");
      require_once("functions.php");
      require_once("benc.php");
      require_once("tsh.php");
      // Load and Start IPB SDK
      require_once "ipbsdk_class.inc.php";
      $SDK =& new IPBSDK();

      if ($SDK->is_loggedin()) {
      // Code for logged in users goes here
      echo '
      ob_start('ob_gzhandler');

      I can't find the missing semicolon you are talking about.. could you help me?

        You have syntax error on both the echo lines.

        <?php
        require_once("config.php");
        // Load and Start IPB SDK
        require_once "ipbsdk_class.inc.php";
        $SDK =& new IPBSDK();
        
        if ($SDK->is_loggedin()) {
        // Code for logged in users goes here
        echo '   //<- No closing single quote and semicolon
        
        $info_hash = (string)$_GET['info_hash'];
        <?php
        require_once("config.php");
        require_once("functions.php");
        require_once("benc.php");
        require_once("tsh.php");
        // Load and Start IPB SDK
        require_once "ipbsdk_class.inc.php";
        $SDK =& new IPBSDK();
        
        if ($SDK->is_loggedin()) {
        // Code for logged in users goes here
        echo '  //<- No closing single quote and semicolon
        ob_start('ob_gzhandler');

          I already have that at the end of those scripts..
          echo 'the huge code';

          like that right? I got it. >_<

            I don't understand what you're saying... you might need to post your entire code, but I don't get why you'd want to echo text like ob_start('ob_gzhandler'); and such. Besides, even if you were trying to do that, you have unescaped quotes.

            Perhaps pasting more of the code would help us get the context for what you're doing... make sure you use the board's

             tags when you post code, though.

              I am trying to intergrate these php pages with my forum (IP😎 using SDK Mod but I keep encountering this Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in.. everywhere.

              Thank you for all of you who have willingless tried to help me out on this, I will post the entire php as an attachment. I had to change the extension to .txt so that I could upload it.

              Please download it and have a look.

                Okay, well if you truly are trying to output that PHP code, then you have to escape single quotes (whichever ones you use as delimiters - here you're using single quotes).

                Example:

                echo 'This isn't going to work!';

                See the color-coding go haywire? Here's what you need to do:

                echo 'Who said this isn\'t going to work? I\'ve escaped my quotes!';

                Now, if you can't be bothered with escaping your quotes, you can always use the heredoc syntax:

                echo <<<EndOfCode
                "Woohoo!" I said.
                
                I can use any type of 'quotes' I want without escaping them!
                
                EndOfCode;

                To read more about escaping quotes as well as the heredoc syntax, see this manual page: [man]string[/man]

                  Write a Reply...