Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Problems with initial setup

BASE-user
2008-09-04
2013-06-03
  • Hello

    I was install base-1.4.1 on debian stable with php4,apache-ssl.
    When I try to finish initial setup on step 4 I have a error:

    Parse error: syntax error, unexpected '{' in /var/www/base/includes/base_signature.inc.php on line 463

    I open this file on Eclipse with php profile and dont see a warning message.

    Where is the problem?

    Maciej

     
    • Hello Maciej,

      in BASE-1.4.1 is some code that is not compatible with php-4.x.
      In particular a try-catch construct for exceptions.

      Gladly this piece of code is not necessary, as I used it only for
      debugging purposes. So it can safely be removed.

      You can either comment out some lines as it is shown here:

      http://secureideas.cvs.sourceforge.net/secureideas/base-php4/includes/base_signature.inc.php?r1=1.23&r2=1.24

      or you can try and install the current CVS version of BASE,
      as can be found under the directory base-php4.

      Further infos about CVS can be found here:

      http://sourceforge.net/cvs/?group_id=103348

      Bye, bye

      Juergen

       
    • Thanks for this date

      I have this problem

       
    • Hello to all you MySQL/PHP gurus.  I grudgingly admit coding isn't my forte, so here goes.

      I was having the same issues as addressed by the OP, but now I get this:

      Parse error: syntax error, unexpected T_ELSE in /var/www/base/includes/base_signature.inc.php on line 512

      I'm not exactly sure what could be in the code that's throwing this error, but any help would be welcomed as this is for a project I'm working on.

      Here's what I have starting with line 463 and going to line 527:

      #      try
      #        {
                   $buf1 = BuildSigLookup($sig_name, $style);

      #        }
      #       catch(Exception $e)
      #       {
      #         $error_msg = __FILE__ . ":" . __LINE__ . ":" . __FUNCTION__ . ": ERROR: BuildSigLookup() has failed: \"" . $e . "\". Returning with empty string.";
      #         if ($debug_mode > 1)
      #         {
      #           SQLTraceLog($error_msg);
      #         }
      #
      #         return "(" . $sig_id . ") (1) " . _ERRSIGNAMEUNK;
      #       }

             if (
                  !isset($buf1) ||
                  empty($buf1) ||
                  !is_string($buf1)
                )
             {
               $error_msg = var_dump($buf1);
               if ($debug_mode > 1)
               {
                 SQLTraceLog($error_msg);
               }
               return "(" . $sig_id . ") (2) " . _ERRSIGNAMEUNK;
             }

             if ($debug_mode > 1)
             {
               SQLTraceLog(__FILE__ . ":" . __LINE__ . ":" . __FUNCTION__ . ": After BuildSigLookup() and before GetSignatureReference()");
             }
             $buf2 = GetSignatureReference($sig_id, $db, $style)." " . $buf1;
             if ($debug_mode > 1)
             {
               SQLTraceLog(__FILE__ . ":" . __LINE__ . ":" . __FUNCTION__ . ": After GetSignatureReference() and about to return.");
             }

             return $buf2;
           }
           else
           {
              if ( $style == 1 )
                 return "($sig_id)<I>"._ERRSIGNAMEUNK."</I>";
              else
                 return "($sig_id) "._ERRSIGNAMEUNK;
           }
        }
        else
        {
          if ($debug_mode > 1)
          {
            SQLTraceLog(__FILE__ . ":" . __LINE__ . ":" . __FUNCTION__ . ": Before BuildSigLookup()");
          }
          $buf1 = BuildSigLookup($sig_id, $style);
          if ($debug_mode > 1)
          {
            SQLTraceLog(__FILE__ . ":" . __LINE__ . ":" . __FUNCTION__ . ": After BuildSigLookup() and about to return.");
          }

          //return BuildSigLookup($sig_id, $style);
          return $buf1;
        }
      }

       
    • >Gladly this piece of code is not necessary, as I used it only for
      >debugging purposes. So it can safely be removed.

      I found out that after remove of that piece of code you will have that problem https://sourceforge.net/forum/forum.php?thread_id=2850724&forum_id=404428.

      As posted there, solved by installation of older version of base (1.4.0).