MyBB Community Forums

Full Version: Parse error? PAYING $25 IF YOU HELP ME
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I was trying to add this.
http://mods.mybb.com/view-resource/chang...older-name

But when I changed it it didn't work so It messed up.
So I just changed it back to this:

$config['admin_dir'] = 'admin'


But that gives me this error
Quote:Parse error: syntax error, unexpected ';' in /home/dream192/public_html/inc/config.php on line 36


This here is the code im working with.
Quote:<?php
/**
* Database configuration
*
* Please see the MyBB Wiki for advanced
* database configuration for larger installations
* http://wiki.mybb.com/
*/

$config['database']['type'] = 'mysql';
$config['database']['database'] = 'dream192_dream';
$config['database']['table_prefix'] = 'mybb_';

$config['database']['hostname'] = 'localhost';
$config['database']['username'] = 'dream192_dream';
$config['database']['password'] = 'dreamdream';

/**
* Admin CP directory
* For security reasons, it is recommended you
* rename your Admin CP directory. You then need
* to adjust the value below to point to the
* new directory.
*/

$config['admin_dir'] = 'admin'
(36 is the last line)


What am I doing wrong? If you could help I'd appreciate it.
The '$config['admin_dir']' line should end with a semicolon, so

$config['admin_dir'] = 'admin';

I don't know if that's the problem, but it needs that semicolon anyway.

Can't you just download a fresh copy of MyBB and use the default config.php file from there, and then edit your database information in?
No the space doesnt effect anything.

Same error.

Also, if you help me you will get $25 Paypal or LR.

And when I remove the ;

it says this

Parse error: syntax error, unexpected T_VARIABLE in /home/dream192/public_html/inc/config.php on line 36
Is it possible to post your full config.php file here?
Yes

here

<?php
/**
* Database configuration
*
* Please see the MyBB Wiki for advanced
* database configuration for larger installations
* http://wiki.mybb.com/
*/

$config['database']['type'] = 'mysql';
$config['database']['database'] = 'dream192_dream';
$config['database']['table_prefix'] = 'mybb_';

$config['database']['hostname'] = 'localhost';
$config['database']['username'] = 'username';
$config['database']['password'] = password';

/**
* Admin CP directory
* For security reasons, it is recommended you
* rename your Admin CP directory. You then need
* to adjust the value below to point to the
* new directory.
*/

$config['admin_dir'] = 'admin' ;

/**
* Hide all Admin CP links
* If you wish to hide all Admin CP links
* on the front end of the board after
* renaming your Admin CP directory, set this
* to 1.
*/

$config['hide_admin_links'] = ;0;

/**
* Data-cache configuration
* The data cache is a temporary cache
* of the most commonly accessed data in MyBB.
* By default, the database is used to store this data.
*
* If you wish to use the file system (cache/ directory), MemCache, xcache, or eAccelerator
* you can change the value below to 'files', 'memcache', 'xcache' or 'eaccelerator' from 'db'.
*/

$config['cache_store'] = 'db';

/**
* Memcache configuration
* If you are using memcache as your data-cache,
* you need to configure the hostname and port
* of your memcache server below.
*
* If not using memcache, ignore this section.
*/

$config['memcache']['host'] = 'localhost';
$config['memcache']['port'] = port;

/**
* Super Administrators
* A comma separated list of user IDs who cannot
* be edited, deleted or banned in the Admin CP.
* The administrator permissions for these users
* cannot be altered either.
*/

$config['super_admins'] = '1';

/**
* Database Encoding
* If you wish to set an encoding for MyBB uncomment
* the line below (if it isn't already) and change
* the current value to the mysql charset:
* http://dev.mysql.com/doc/refman/5.1/en/c...mysql.html
*/

$config['database']['encoding'] = 'utf8';

/**
* Automatic Log Pruning
* The MyBB task system can automatically prune
* various log files created by MyBB.
* To enable this functionality for the logs below, set the
* the number of days before each log should be pruned.
* If you set the value to 0, the logs will not be pruned.
*/

$config['log_pruning'] = array(
'admin_logs' => 365, // Administrator logs
'mod_logs' => 365, // Moderator logs
'task_logs' => 30, // Scheduled task logs
'mail_logs' => 180, // Mail error logs
'user_mail_logs' => 180, // User mail logs
'promotion_logs' => 180 // Promotion logs
);

?>


i edited out my information,
This line;

$config['hide_admin_links'] = ;0;

needs to be corrected to this;

$config['hide_admin_links'] = 0;
That gave me the same error.
What I recommend doing is just getting a new config.php and just replace the DB details.
I have found your problem!
Your line 36 was specified wrong.
It's actually

$config['hide_admin_links'] = ;0;

So as the error says there's an extra ";" , you have to remove that.
Hence the new code:

$config['hide_admin_links'] = 0;

I would love $25. Thank you very much.
I hope you were serious about the $25...
Upload Default config.php from fresh mybb package

and then change this
$config['admin_dir'] = 'admin';
to
$config['admin_dir'] = 'admin32';

now go to filemanager or login with ftp and rename admin to admin32

this should work
Pages: 1 2