View previous topic :: View next topic |
Author |
Message |
Raechell
Joined: 14 May 2004 Posts: 6
|
Posted: Fri May 14, 2004 10:07 pm Post subject: *sigh* Perse error... New to b2 & PHP :/ |
|
|
Quote: | Parse error: parse error in /home/whispers/public_html/updates/b2/b2config.php on line 17 |
Is what I receive after configuring b2config.php & uploading everything.
Here's my code:
Code: | <?php
/* *
* b2's config file *
* */
# Reminder: everything that starts with #, /* or // is a comment
/* Start editing */
# $siteurl is your blog's URL: for example, 'http://mydomain.com' (no trailing slash !)
#
$blogfilename is the name of the default file for your blog
#
$blogname is the name of your blog
$siteurl = 'http://whisperslip.nu/updates/b2';
$blogfilename = '../index.shtml';
$blogname = "update bucket";
$blogdescription = "wee~!";
# fill these only if you have a Cafelog ID,
# this enables your blog to be in the Recently Updated b2 blogs list.
# to obtain this ID, e-mail [email protected] with these details:
# name of the weblog, weblog's URL, your e-mail address, and a password
# in the future, the password will allow you to change these details online
$cafelogID = '0';
$use_cafelogping = 0; # set this to 1 if you do have a Cafelog ID
#
$pathserver is where you have uploaded b2: for example, 'http://mydomain.com' (no ending slash !)
# by default b2 is set to run in the folder your blog resides, same as $siteurl
$pathserver = 'http://whisperslip.nu/updates/b2';
# your email (obvious uh ?)
$admin_email = '[email protected]';
# set this to 0 or 1, whether you want new users to be able to post entries once they registered
$new_users_can_blog = 0;
# set this to 0 or 1, whether you want to allow users to register on your blog.
$users_can_register = 0;
# day at the start of the week: 0 for Sunday, 1 for Monday, 2 for Tuesday, etc
$start_of_week = 1;
//
** MySQL settings **
# fill with your database details
$dbname = 'updates'; // the name of the database
$dbhost = 'localhost'; // 99% chances you won't need to change this value
$dbusername = 'raechell'; // your MySQL username
$dbpassword = 'nwn1uv'; // ...and password
# database tables' names (change them if you want to have multiple b2's in a single database)
$tableposts = 'b2posts';
$tableusers = 'b2users';
$tablesettings = 'b2settings';
$tablecategories = 'b2categories';
$tablecomments = 'b2comments';
// |
I stopped after the MySQL settings because I don't think anything is wrong after that. =) |
|
Back to top |
|
 |
Sigg3
Joined: 03 Jul 2003 Posts: 268 Location: Oslo, Norway
|
|
Back to top |
|
 |
Raechell
Joined: 14 May 2004 Posts: 6
|
Posted: Sat May 15, 2004 3:12 pm Post subject: |
|
|
That's how it came, and instead of viewing b2config.php in the browser, I just viewed the folder. This is what the message says 'now':
Quote: | Parse error: parse error in /home/whispers/public_html/updates/b2/b2config.php on line 17
Can't connect to the database . MySQL said:
No Database Selected |
I've deleted the database. Still doesn't work.
I've renamed the database and the database information. Still didn't work.
Code: | ** MySQL settings **
# fill with your database details
$dbname = 'updates'; // the name of the database
$dbhost = 'localhost'; // 99% chances you won't need to change this value
$dbusername = 'rae'; // your MySQL username
$dbpassword = '1111'; // ...and password
# database tables' names (change them if you want to have multiple b2's in a single database)
$tableposts = 'b2posts';
$tableusers = 'b2users';
$tablesettings = 'b2settings';
$tablecategories = 'b2categories';
$tablecomments = 'b2comments';
// |
|
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 130
|
Posted: Sat May 15, 2004 10:15 pm Post subject: |
|
|
Line 17 is Code: | $blogfilename = '../index.shtml'; | cannot have ../ in it. It should be just the file name without any path in it |
|
Back to top |
|
 |
Raechell
Joined: 14 May 2004 Posts: 6
|
Posted: Sun May 16, 2004 3:43 pm Post subject: |
|
|
Didn't work.
I'm still getting a MySQL error. |
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 130
|
Posted: Sun May 16, 2004 3:56 pm Post subject: |
|
|
Firstly, I suspect that the $blogfilename should be index.php and not index.shtml
Secondly, can you confirm you have installed b2 by running b2install.php
Thirdly, are you sure your database's name is updates? Although you may have created a database called updates, many hosts stick a prefix in front of it so it ends being called something like whispers_updates. The same thing happens to the username - check in your control panel to see what it says. |
|
Back to top |
|
 |
Raechell
Joined: 14 May 2004 Posts: 6
|
Posted: Sun May 16, 2004 3:59 pm Post subject: |
|
|
I tried changing to whispers_updates and whispers_rae, and I received no results. =(
I renamed the file to index.php. Switched back and forth from whispers_updates to just updates.
No results...
[edit] I tried running b2install and I receive the same error message. |
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 130
|
Posted: Sun May 16, 2004 4:00 pm Post subject: |
|
|
What does your control panel say about the names, where you created the database? |
|
Back to top |
|
 |
Raechell
Joined: 14 May 2004 Posts: 6
|
Posted: Sun May 16, 2004 4:11 pm Post subject: |
|
|
Quote: | whispers_updates
Users in updates
whispers_rae (Privileges: ALL PRIVILEGES)
Connection Strings
Perl $dbh = DBI->connect("DBI:mysql:whispers_updates:localhost","whispers_rae","<PASSWORD HERE>");
PHP $dbh=mysql_connect ("localhost", "whispers_rae", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("whispers_updates");
|
|
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 130
|
Posted: Sun May 16, 2004 4:18 pm Post subject: |
|
|
OK. So now you should have:
Code: | $dbname = 'whispers_updates'; // the name of the database
$dbhost = 'localhost'; // 99% chances you won't need to change this value
$dbusername = 'whispers_rae'; // your MySQL username
$dbpassword = 'your password'; // ...and password |
Replace 'your password' by whatver password goes with whispers_rae user.
Then run b2install.php. It should create tables in the database. If it does, delete b2install.php and then your blog is ready |
|
Back to top |
|
 |
|