Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

New Parse Error

This discussion is related to the Vanilla Porter addon.

Got the following today..

Parse error: syntax error, unexpected T_FUNCTION in /home/cbabas/cbabaseball.com/board/vanilla2export.php on line 3677

Trying to export Vanilla 1.1.10 forum

Comments

  • LincLinc Director of Development Detroit Vanilla Staff

    You're not on PHP 5.3 which the Porter requires.

    You can try removing the entire section around that line starting with // Ranks and ending with // Permissions.

    UnderDog
  • First - thank you for the very quick reply..

    I removed this:

      // Ranks.
      $Rank_Map = array(
         'rank_id' => 'RankID',
         'level' => array('Column' => 'Level', 'Filter' => function($Value) {
            static $Level = 0;
            $Level++;
    
            return $Level;
         }),
         'rank_title' => 'Name',
         'title2' => 'Label',
         'rank_min' => array('Column' => 'Attributes', 'Filter' => function($Value, $Field, $Row) {
            $Result = array();
    
            if ($Row['rank_min']) {
               $Result['Criteria']['CountPosts'] = $Row['rank_min'];
            }
    
            if ($Row['rank_special']) {
               $Result['Criteria']['Manual'] = TRUE;
            }
    
            return serialize($Result);
         })
      );
      $Ex->ExportTable('Rank', "
         select r.*, r.rank_title as title2, 0 as level
         from phpbb_ranks r
         order by rank_special, rank_min;", $Rank_Map);
    

    But now I get this:

    Parse error: syntax error, unexpected T_FUNCTION in /home/cbabas/cbabaseball.com/board/vanilla2export.php on line 3990

  • why not upgrade to php 5.3 and make life easier. most hosts allow this pretty easily. and if you self host - you can also do it pretty easily.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    UnderDog
  • LincLinc Director of Development Detroit Vanilla Staff

    So, this is a bit further than I can troubleshoot right now. You're probably going to get a long series of these. You can keep removing sections around the errors and see if you can make it work, or try version 1.8 of the porter and see if that works.

    UnderDog
  • Ok, I appreciate the help anyway. Maybe this just won't work for my siituation. I looked and I am using PHP version 5.2.17 and don't host my own site, hence the move to a new forum where I will have my own control.

    I tried the 1.8 but got another one. I haven't looked at it but I assume more of the same..

    Parse error: syntax error, unexpected T_FUNCTION in /home/cbabas/cbabaseball.com/board/vanilla2export.php on line 3497

  • peregrineperegrine MVP
    edited December 2013

    Did you call your host? That is a relatively old version of PHP. On some hosts you can switch php version via cpanel. your host must have a way to use a relatively current version of php.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    UnderDog
  • I was able to get it upgraded to 5.3 this morning and export went great. Just stuck importing into Vanilla 2... getting problems stuck at authenticating admin user.. search shows some other folks have had similar problems. Is this the same user login and password I just used a minute ago in the exporter screen?

  • hgtonighthgtonight ∞ · New Moderator

    It should be the admin username and password used in your old forum.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    UnderDog
  • LincLinc Director of Development Detroit Vanilla Staff

    I recommend entering the email address, no password, and selecting "Use my current password" which will maintain the password you logged in with for your current session.

    UnderDog
  • netdzynrnetdzynr New
    edited March 2014

    OK, several months later I'm running into this same syntax error. I'm on hosted GoDaddy though, so AFAIK there's no way to get SQL updated to a later version. I've exported the entire original database, but attempting to import it fails at the GDN_Activity table with a "table already exists" error. Is my only recourse to go through the exported SQL table-by-table and manually import each table's data into the new database? Maybe there's a more current export/import method?

    Thanks for any suggestions.

    Oh, I'm exporting from a v 2.0.18.8 installation and importing into 2.0.18.10.

  • Oh, I'm exporting from a v 2.0.18.8 installation and importing into 2.0.18.10.

    You don't export between vanilla 2 versions. Follow the documentation on upgrading.

    The difference between these versions is minimal, and not to do the the database.

    grep is your friend.

  • Thanks but I'm not just updating -- I'm moving the forum from GoDaddy to another host. Unless I'm missing something, the upgrading doc you mentioned simply covers updating an existing installation on the same server.

    Any other suggestions?

  • OK, answering my own question: I risked it all, dropping all SQL tables from the new installation, imported all tables from the existing GoDaddy installation, and so far, the only item that needed updating was the banner image. Everything appears to have come across.

    So for the moment, problem solved.

    hgtonight
  • x00x00 MVP
    edited March 2014

    yes for migration make a back up, and a mysql dump. Use that for migration.

    mysql dump is alway better than than the alternative, as is native sql, and the scheme is included.

    There is no need to use the porter at all.

    The porter as the name implies is for importing other formats converting between two different softwares.

    As I said with 2.0.18.8 and 2.0.18.10 there is no difference as far as the database is concerned.

    grep is your friend.

Sign In or Register to comment.