PC Pals Forum

Technical Help & Discussion => Website Design & Programming => Topic started by: davy51 on May 11, 2009, 21:51

Title: syntax error
Post by: davy51 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
Title: Re: syntax error
Post by: sam 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.
Title: Re: syntax error
Post by: Simon on May 11, 2009, 22:18
That is, we're sure YOU can fix it, Sam.  ;)
Title: Re: syntax error
Post by: davy51 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
Title: Re: syntax error
Post by: sam 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?
Title: Re: syntax error
Post by: davy51 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

Title: Re: syntax error
Post by: davy51 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'] = '';





Title: Re: syntax error
Post by: sam 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;
Title: Re: syntax error
Post by: davy51 on May 12, 2009, 13:14
Thanks Sam we are trying it now
Title: Re: syntax error
Post by: davy51 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
Title: Re: syntax error
Post by: sam 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.
Title: Re: syntax error
Post by: davy51 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
Title: Re: syntax error
Post by: davy51 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
Title: Re: syntax error
Post by: davy51 on May 12, 2009, 15:26
I had to send them in an email SAm
 Sorry
Title: Re: syntax error
Post by: sam on May 12, 2009, 15:36
ok will look at them tonight.
Title: Re: syntax error
Post by: sam on May 12, 2009, 22:10
dave - I've looked at the code and made the changes, see your email. Once we have a fix I'll post it here.
Title: Re: syntax error
Post by: davy51 on May 12, 2009, 22:24
Thank you Sam
He is uploading to the server now
I dont think we could have done it without you
 :thumbs:
Title: Re: syntax error
Post by: davy51 on May 13, 2009, 01:02
ok sam the syntax error went away and now we are getting a database error
I sent you an email about it
Title: Re: syntax error
Post by: davy51 on May 13, 2009, 20:50
Sam the site is up and waiting for the settings inside and the DNS to be set

Thanks to you it is a successful operation

Thank you from many friends you don't know yet
Title: Re: syntax error
Post by: sam on May 13, 2009, 21:01
no problem - pleased I could be of assistance.

For future ref: it looks like it was mostly problems with the config.php file not being set correctly.
Title: Re: syntax error
Post by: davy51 on May 13, 2009, 21:50
As you helped us we began to see that
It just took someone that works with linux to point it out to us  :)x

Thanks again

Anyone here is welcome to come over and post we have a world wide membership

Title: Re: syntax error
Post by: Rik on May 14, 2009, 09:35
Linky?
Title: Re: syntax error
Post by: davy51 on May 14, 2009, 12:40
The DNS hasn't caught up yet Rik as soon as it does I will post a link

It is a forum for Tobacco Pipe smokers and antique pipe collectors

just a bunch of folks enjoying a hobby

Everyone is welcome even non smokers

Some of the custom made pipes we collect are works of art
Title: Re: syntax error
Post by: Rik on May 14, 2009, 15:23
My father was a pipe smoker, but I found the cleaning very off putting. :)
Title: Re: syntax error
Post by: davy51 on May 14, 2009, 15:42
Thats just part of the hobby Rik
It becomes relaxing after doing for a long time
Title: Re: syntax error
Post by: Rik on May 14, 2009, 17:35
I just thought it was exceedingly unpleasant and smelly. ;)
Title: Re: syntax error
Post by: davy51 on May 14, 2009, 19:03
You smelled the wrong stuff Rik
It can be had in any flavor now including grape of all things lol
Title: Re: syntax error
Post by: Rik on May 15, 2009, 10:01
I prefer my grapes fermented, Davy. ;)
Title: Re: syntax error
Post by: davy51 on May 15, 2009, 12:52
Well if you cant drink them at least you can smoke them  :)x