Sponsor for PC Pals Forum

Author Topic: syntax error  (Read 9716 times)

Offline davy51

  • Loyal Member
  • *****
  • Posts: 1690
syntax error
« on: May 11, 2009, 21:51 »
Im trying to set up a forum and am having problems
I am getting this error

Parse error: syntax error, unexpected '[' in \\nawinfs06\home\users\web\b2000\*******\Forum\includes\config.php on line 27


Its bugging me
I nee d help lol
« Last Edit: May 11, 2009, 21:59 by davy51 »
Dave

Don't walk behind me, I may not lead. Don't walk in front of me, I may not follow. Just walk beside me and be my friend

Albert Camus

Offline sam

  • Administrator
  • *****
  • Posts: 19977
Re: syntax error
« Reply #1 on: May 11, 2009, 22:04 »
what forum software are you trying to setup?

sounds like for some reason the php has a '[' where their should not be one in the config file. If you post the whole code - or the code around line 27 I'm sure we can fix it.
- sam | @starrydude --

Offline Simon

  • Administrator
  • *****
  • Posts: 77921
  • First to score 7/7 in Quiz of The Week's News 2017
Re: syntax error
« Reply #2 on: May 11, 2009, 22:18 »
That is, we're sure YOU can fix it, Sam.  ;)
Many thanks to all our members, who have made PC Pals such an outstanding success!   :thumb:

Offline davy51

  • Loyal Member
  • *****
  • Posts: 1690
Re: syntax error
« Reply #3 on: May 11, 2009, 22:18 »
vBulletin, latest version Sam


This is what i have exactly
 and getting an error




//   ****** DATABASE TYPE ******

['DB_TYPE'] = "mysql"
//   ****** DATABASE NAME ******
"********.startlogicmysql.com".
$config['Database']['smoke_forum_2009'] = 'forum';gr
$config['Database']['smoke_forum_2009'] = 'forum'
//   ****** MASTER DATABASE SERVER NAME AND PORT ******

values.
$config['MasterServer']['*******.startlogicmysql.com'] = 'localhost';
$config['MasterServer']['port'] = 3306;


//   ****** MASTER DATABASE USERNAME & PASSWORD ******

"********.startlogicmysql.com". $config['MasterServer']['***_*_****'] = 'root'; $config['MasterServer']['**-*********'] = '';



of course the stars replace personal info
« Last Edit: May 11, 2009, 22:26 by davy51 »
Dave

Don't walk behind me, I may not lead. Don't walk in front of me, I may not follow. Just walk beside me and be my friend

Albert Camus

Offline sam

  • Administrator
  • *****
  • Posts: 19977
Re: syntax error
« Reply #4 on: May 11, 2009, 22:43 »
assuming this copied correctly then I think there are a number of isses. The first is that there appears to be a number of syntax errors - did you edit the file much? The big issue is at the end of each line there should be a  ";" this is the end of line command and I would expect to see this on the first line like:

Code: [Select]
['DB_TYPE'] = "mysql" ;
according to the vBulletin manual it should be declared like so:

Code: [Select]
$config['Database']['dbtype'] = 'mysql';
actually the vBulletin board manual for config.php looks quite different: http://www.vbulletin.com/docs/html/main/config.php Have you had to do much editing?
- sam | @starrydude --

Offline davy51

  • Loyal Member
  • *****
  • Posts: 1690
Re: syntax error
« Reply #5 on: May 11, 2009, 22:48 »
Yes, he started with just pertinent lines and began trying other things...
at first he got the same error on line 34 but now this one

Dave

Don't walk behind me, I may not lead. Don't walk in front of me, I may not follow. Just walk beside me and be my friend

Albert Camus

Offline davy51

  • Loyal Member
  • *****
  • Posts: 1690
Re: syntax error
« Reply #6 on: May 12, 2009, 00:21 »
this is exactly what we have now sam


//   ****** DATABASE TYPE ******

['DB_TYPE'] = "mysql"
//   ****** DATABASE NAME ******
"greenber.startlogicmysql.com".
$config['Database']['smoke_forum_2009'] = 'forum';gr
$config['Database']['smoke_forum_2009'] = 'forum'
//   ****** MASTER DATABASE SERVER NAME AND PORT ******

values.
$config['MasterServer']['greenber.startlogicmysql.com'] = 'localhost';
$config['MasterServer']['port'] = 3306;


//   ****** MASTER DATABASE USERNAME & PASSWORD ******

"greenber.startlogicmysql.com". $config['MasterServer']['bob_g_1947'] = 'root'; $config['MasterServer']['88-Sportster'] = '';





Dave

Don't walk behind me, I may not lead. Don't walk in front of me, I may not follow. Just walk beside me and be my friend

Albert Camus

Offline sam

  • Administrator
  • *****
  • Posts: 19977
Re: syntax error
« Reply #7 on: May 12, 2009, 07:03 »
Ok - try below. I've looked at the default config.php for a vBulletin board and altered it with the info you have given me. You *need* to add you password...  where it says 'INSERT PASSWORD' i.e. just change the text leaving the apostrophes. You may need to alter some of the other parameters too.

Code: [Select]
<?php

//   ****** DATABASE TYPE ******
$config['Database']['dbtype'] = 'mysql';

    
//    ****** DATABASE NAME ******
$config['Database']['dbname'] = 'smoke_forum_2009';

    
//    ****** TABLE PREFIX ******
    //    Prefix that your vBulletin tables have in the database.
$config['Database']['tableprefix'] = '';

    
//    ****** TECHNICAL EMAIL ADDRESS ******
$config['Database']['technicalemail'] = 'dbmaster@example.com';

    
//    ****** FORCE EMPTY SQL MODE ******
$config['Database']['force_sql_mode'] = false;

    
//    ****** MASTER DATABASE SERVER NAME AND PORT ******
$config['MasterServer']['servername'] = 'greenber.startlogicmysql.com'
$config['MasterServer']['port'] = 3306;

    
//    ****** MASTER DATABASE USERNAME & PASSWORD ******
$config['MasterServer']['username'] = 'bob_g_1947';
$config['MasterServer']['password'] = 'INSERT PASSWORD';

    
//    ****** MASTER DATABASE PERSISTENT CONNECTIONS ******
$config['MasterServer']['usepconnect'] = 0;

    
//    ****** SLAVE DATABASE CONFIGURATION ******
    //    If you have multiple database backends, this is the information for your slave
    //    server. If you are not 100% sure you need to fill in this information,
    //    do not change any of the values here.
$config['SlaveServer']['servername'] = '';
$config['SlaveServer']['port'] = 3306;
$config['SlaveServer']['username'] = '';
$config['SlaveServer']['password'] = '';
$config['SlaveServer']['usepconnect'] = 0;


    
//    ****** PATH TO ADMIN & MODERATOR CONTROL PANELS ******
$config['Misc']['admincpdir'] = 'admincp';
$config['Misc']['modcpdir'] = 'modcp';
$config['Misc']['cookieprefix'] = 'bb';

    
//    ******** FULL PATH TO FORUMS DIRECTORY ******
    //    On a few systems it may be necessary to input the full path to your forums directory
    //    for vBulletin to function normally. You can ignore this setting unless vBulletin
    //    tells you to fill this in. Do not include a trailing slash!
    //    Example Unix:
    //      $config['Misc']['forumpath'] = '/home/users/public_html/forums';
    //    Example Win32:
    //      $config['Misc']['forumpath'] = 'c:\program files\apache group\apache\htdocs\vb3';
$config['Misc']['forumpath'] = '';


    
//    ****** USERS WITH ADMIN LOG VIEWING PERMISSIONS ******
$config['SpecialUsers']['canviewadminlog'] = '1';

    
//    ****** USERS WITH ADMIN LOG PRUNING PERMISSIONS ******
$config['SpecialUsers']['canpruneadminlog'] = '1';

    
//    ****** USERS WITH QUERY RUNNING PERMISSIONS ******
$config['SpecialUsers']['canrunqueries'] = '';

    
//    ****** UNDELETABLE / UNALTERABLE USERS ******
$config['SpecialUsers']['undeletableusers'] = '';

    
//    ****** SUPER ADMINISTRATORS ******
$config['SpecialUsers']['superadministrators'] = '1';

    
// ****** DATASTORE CACHE CONFIGURATION *****
    // Here you can configure different methods for caching datastore items.
    // vB_Datastore_Filecache  - for using a cache file
// $config['Datastore']['class'] = 'vB_Datastore_Filecache';
    // vB_Datastore_Memcached - for using a Memcache server
    // It is also necessary to specify the hostname or IP address and the port the server is listening on
/*
$config['Datastore']['class'] = 'vB_Datastore_Memcached';
$i = 0;
// First Server
$i++;
$config['Misc']['memcacheserver'][$i]        = '127.0.0.1';
$config['Misc']['memcacheport'][$i]            = 11211;
$config['Misc']['memcachepersistent'][$i]    = true;
$config['Misc']['memcacheweight'][$i]        = 1;
$config['Misc']['memcachetimeout'][$i]        = 1;
$config['Misc']['memcacheretry_interval'][$i] = 15;
*/
// ****** The following options are only needed in special cases ******

    //    ****** MySQLI OPTIONS *****
// $config['Mysqli']['charset'] = 'utf8';
$config['Mysqli']['ini_file'] = '';

// Image Processing Options
    // Images that exceed either dimension below will not be resized by vBulletin. If you need to resize larger images, alter these settings.
$config['Misc']['maxwidth'] = 2592;
$config['Misc']['maxheight'] = 1944;
- sam | @starrydude --

Offline davy51

  • Loyal Member
  • *****
  • Posts: 1690
Re: syntax error
« Reply #8 on: May 12, 2009, 13:14 »
Thanks Sam we are trying it now
Dave

Don't walk behind me, I may not lead. Don't walk in front of me, I may not follow. Just walk beside me and be my friend

Albert Camus

Offline davy51

  • Loyal Member
  • *****
  • Posts: 1690
Re: syntax error
« Reply #9 on: May 12, 2009, 14:10 »
the fix didnt work sam

it still gives the syntax error on line 27

I am sending the file by pm so you can see what we got
Dave

Don't walk behind me, I may not lead. Don't walk in front of me, I may not follow. Just walk beside me and be my friend

Albert Camus

Offline sam

  • Administrator
  • *****
  • Posts: 19977
Re: syntax error
« Reply #10 on: May 12, 2009, 14:33 »
I'm wondering if it is another file - did he edit anything else?

also could you give the specific error - i.e. everything the browser returns.
- sam | @starrydude --

Offline davy51

  • Loyal Member
  • *****
  • Posts: 1690
Re: syntax error
« Reply #11 on: May 12, 2009, 14:38 »
He is re downloading the compleat just in case something went wrong then
He is going to use what you gave him without editing
In other words he is starting over

Maybe this will fix the problem
If not I will pm you the new PHP and his info
Dave

Don't walk behind me, I may not lead. Don't walk in front of me, I may not follow. Just walk beside me and be my friend

Albert Camus

Offline davy51

  • Loyal Member
  • *****
  • Posts: 1690
Re: syntax error
« Reply #12 on: May 12, 2009, 15:08 »
Here are the files Sam I couldnt get them in a pm si i will send then in an email
« Last Edit: May 12, 2009, 15:14 by davy51 »
Dave

Don't walk behind me, I may not lead. Don't walk in front of me, I may not follow. Just walk beside me and be my friend

Albert Camus

Offline davy51

  • Loyal Member
  • *****
  • Posts: 1690
Re: syntax error
« Reply #13 on: May 12, 2009, 15:26 »
I had to send them in an email SAm
 Sorry
« Last Edit: May 12, 2009, 15:31 by davy51 »
Dave

Don't walk behind me, I may not lead. Don't walk in front of me, I may not follow. Just walk beside me and be my friend

Albert Camus

Offline sam

  • Administrator
  • *****
  • Posts: 19977
Re: syntax error
« Reply #14 on: May 12, 2009, 15:36 »
ok will look at them tonight.
- sam | @starrydude --


Show unread posts since last visit.
Sponsor for PC Pals Forum