1 (edited by Lati@s 2007-07-04 14:24)

Topic: Need help to create a PunBB forum!

Hey! big_smile
I'm trying to create a forum for http://www.cricket.no/ , but I don't know what the HTML-code should be for the forum. I have downloaded 1.2.15, and I hope someone knows what the code should be. I want the forum to be good because it is the official site for cricket in Norway.

Btw, there is not very much on http://www.cricket.no/ because it is a new site! wink

2

Re: Need help to create a PunBB forum!

I don't understand the question. To install the forum just follow the instructions here http://punbb.org/docs/install.html which are also duplicated in the documents that came with the download package.

Re: Need help to create a PunBB forum!

Hmm... Okay, I'll try.
But the Admin_Maintenance.php won't open. Some bad errors comes up on the screen.

4

Re: Need help to create a PunBB forum!

you can not access it directly, you have to be connected as administrator the go to the administration panel

5 (edited by Lati@s 2007-06-28 12:22)

Re: Need help to create a PunBB forum!

Okay.
I didn't understand this (it came up when I was trying to install the forum):

here instead.'); // Make sure we are running at least PHP 4.1.0 if (intval(str_replace('.', '', phpversion())) < 410) exit('You are running PHP version '.PHP_VERSION.'. PunBB requires at least PHP 4.1.0 to run properly. You must upgrade your PHP installation before you can continue.'); // Disable error reporting for uninitialized variables error_reporting(E_ALL); // Turn off PHP time limit @set_time_limit(0); if (!isset($_POST['form_sent'])) { // Determine available database extensions $dual_mysql = false; $db_extensions = array(); if (function_exists('mysqli_connect')) $db_extensions[] = array('mysqli', 'MySQL Improved'); if (function_exists('mysql_connect')) { $db_extensions[] = array('mysql', 'MySQL Standard'); if (count($db_extensions) > 1) $dual_mysql = true; } if (function_exists('sqlite_open')) $db_extensions[] = array('sqlite', 'SQLite'); if (function_exists('pg_connect')) $db_extensions[] = array('pgsql', 'PostgreSQL'); if (empty($db_extensions)) exit('This PHP environment does not have support for any of the databases that PunBB supports. PHP needs to have support for either MySQL, PostgreSQL or SQLite in order for PunBB to be installed.'); ?>

6

Re: Need help to create a PunBB forum!

What version of php is actually running on your server.

Re: Need help to create a PunBB forum!

I downloaded the latest version today, but the same message keeps coming up on the screen.

Re: Need help to create a PunBB forum!

OK, so you have done the basics:

- gotten MySQL and PHP and Apache (if applicable) working OK;
- created a empty MySQL database to hold your forum, and given it a name;
- created a MySQl user to own and operate that database too, if needed.
- then decided on the location for your punBB files in the folder system on your server (usually something like /home/username/mysitename/www/mypunbbforum

Then you've followed the punBB docs:

Installation
Copy/upload all contents of the directory upload/ into the directory where you want to run your forums. 
Run install.php from the forum root directory (e.g. open http://mydomain/myforums/install.php in your browser). Follow the instructions.

Then you have setup your "Database type", "Database server hostname" "Database name" "Table prefix" "Administrator username" "Administrator password 1" "Administrator's e-mail" "Base URL" as instructed by install.php.

And then you have created a new file called 'config.php' which you have placed in the root of the directory  you want to run punbb in  -eg /home/username/mysitename/www/mypunbbforum.

So you now have a website folder hierarchy that looks like this:

/www - the standard root of your Apache (or whatever) website,

and within that your punbb forum folders:

-/mypunbbforum - the root of your forum, with PHP files like register.php, viewforum.php and config.php there

and the following folders:

-/mypunbbforum/cache/
-/mypunbbforum/img/
-/mypunbbforum/include/
-/mypunbbforum/lang/
-/mypunbbforum/style/     

That's all that is usually technically necessary to kick punBB into life. Do the basic config operations, then upload the files into the right place.

Please note that there is NO folder named 'upload' in the example above - that's just meant to be the name of the folder you upload your files FROM, into a folder like /www/mypunbbforum/ on your server.

If you have successfully done all the technical steps above, I suspect your problem may be as simple as having uploaded all your files in the wrong place. Maybe check that step again.

In particular, ditch the 'upload' folder and just unzip or move the main punBB files into your root punbb folder. In particular your config.php file. That's where punBB is looking for it.

Re: Need help to create a PunBB forum!

I have uploaded all the files I need on SmartFTP, but what now?
Which of the files i the main file?

10

Re: Need help to create a PunBB forum!

http://punbb.org/docs/video_tutorials/

Re: Need help to create a PunBB forum!

Lati@s wrote:

Okay.
I didn't understand this (it came up when I was trying to install the forum):

here instead.'); // Make sure we are running at least PHP 4.1.0 if (intval(str_replace('.', '', phpversion())) < 410) exit('You are running PHP version '.PHP_VERSION.'. PunBB requires at least PHP 4.1.0 to run properly. You must upgrade your PHP installation before you can continue.'); // Disable error reporting for uninitialized variables error_reporting(E_ALL); // Turn off PHP time limit @set_time_limit(0); if (!isset($_POST['form_sent'])) { // Determine available database extensions $dual_mysql = false; $db_extensions = array(); if (function_exists('mysqli_connect')) $db_extensions[] = array('mysqli', 'MySQL Improved'); if (function_exists('mysql_connect')) { $db_extensions[] = array('mysql', 'MySQL Standard'); if (count($db_extensions) > 1) $dual_mysql = true; } if (function_exists('sqlite_open')) $db_extensions[] = array('sqlite', 'SQLite'); if (function_exists('pg_connect')) $db_extensions[] = array('pgsql', 'PostgreSQL'); if (empty($db_extensions)) exit('This PHP environment does not have support for any of the databases that PunBB supports. PHP needs to have support for either MySQL, PostgreSQL or SQLite in order for PunBB to be installed.'); ?>

This shows that you dont have php on your server

12

Re: Need help to create a PunBB forum!

Do I have to have a user at cPanel X to make a MySQL Database?

13

Re: Need help to create a PunBB forum!

I don't know what I'm doing wrong...
PunBB won't install.

An error occured on line '.$line.' in file '.$file.'.

'; else echo 'An error occured.

'; echo 'PunBB reported: '.htmlspecialchars($message).'

'; if ($db_error !== false) echo 'Database reported: '.htmlspecialchars($db_error['error_msg']).(($db_error['error_no']) ? ' (Errno: '.$db_error['error_no'].')' : ''); exit; } $db_type = $_POST['req_db_type']; $db_host = trim($_POST['req_db_host']); $db_name = trim($_POST['req_db_name']); $db_username = unescape(trim($_POST['db_username'])); $db_password = unescape(trim($_POST['db_password'])); $db_prefix = trim($_POST['db_prefix']); $username = unescape(trim($_POST['req_username'])); $email = strtolower(trim($_POST['req_email'])); $password1 = unescape(trim($_POST['req_password1'])); $password2 = unescape(trim($_POST['req_password2'])); // Make sure base_url doesn't end with a slash if (substr($_POST['req_base_url'], -1) == '/') $base_url = substr($_POST['req_base_url'], 0, -1); else $base_url = $_POST['req_base_url']; // Validate username and passwords if (strlen($username) < 2) error('Usernames must be at least 2 characters long. Please go back and correct.'); if (strlen($password1) < 4) error('Passwords must be at least 4 characters long. Please go back and correct.'); if ($password1 != $password2) error('Passwords do not match. Please go back and correct.'); if (!strcasecmp($username, 'Guest')) error('The username guest is reserved. Please go back and correct.'); if (preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $username)) error('Usernames may not be in the form of an IP address. Please go back and correct.'); if (preg_match('#\[b\]|\[/b\]|\[u\]|\[/u\]|\[i\]|\[/i\]|\[color|\[/color\]|\[quote\]|\[/quote\]|\[code\]|\[/code\]|\[img\]|\[/img\]|\[url|\[/url\]|\[email|\[/email\]#i', $username)) error('Usernames may not contain any of the text formatting tags (BBCode) that the forum uses. Please go back and correct.'); if (strlen($email) > 50 || !preg_match('/^(([^<>()[\]\\.,;:\s@"\']+(\.[^<>()[\]\\.,;:\s@"\']+)*)|("[^"\']+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-zA-Z\d\-]+\.)+[a-zA-Z]{2,}))$/', $email)) error('The administrator e-mail address you entered is invalid. Please go back and correct.'); // Load the appropriate DB layer class switch ($db_type) { case 'mysql': require PUN_ROOT.'include/dblayer/mysql.php'; break; case 'mysqli': require PUN_ROOT.'include/dblayer/mysqli.php'; break; case 'pgsql': require PUN_ROOT.'include/dblayer/pgsql.php'; break; case 'sqlite': require PUN_ROOT.'include/dblayer/sqlite.php'; break; default: error('\''.$db_type.'\' is not a valid database type.'); } // Create the database object (and connect/select db) $db = new DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, false); // Do some DB type specific checks switch ($db_type) { case 'mysql': case 'mysqli': break; case 'pgsql': // Make sure we are running at least PHP 4.3.0 (needed only for PostgreSQL) if (version_compare(PHP_VERSION, '4.3.0', '<')) error('You are running PHP version '.PHP_VERSION.'. PunBB requires at least PHP 4.3.0 to run properly when using PostgreSQL. You must upgrade your PHP installation or use a different database before you can continue.'); break; case 'sqlite': if (strtolower($db_prefix) == 'sqlite_') error('The table prefix \'sqlite_\' is reserved for use by the SQLite engine. Please choose a different prefix.'); break; } // Make sure PunBB isn't already installed $result = $db->query('SELECT 1 FROM '.$db_prefix.'users WHERE id=1'); if ($db->num_rows($result)) error('A table called "'.$db_prefix.'users" is already present in the database "'.$db_name.'". This could mean that PunBB is already installed or that another piece of software is installed and is occupying one or more of the table names PunBB requires. If you want to install multiple copies of PunBB in the same database, you must choose a different table prefix.'); // Create all tables switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."bans ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, username VARCHAR(200), ip VARCHAR(255), email VARCHAR(50), message VARCHAR(255), expire INT(10) UNSIGNED, PRIMARY KEY (id) ) TYPE=MyISAM;"; break; case 'pgsql': $db->start_transaction(); $sql = 'CREATE TABLE '.$db_prefix."bans ( id SERIAL, username VARCHAR(200), ip VARCHAR(255), email VARCHAR(50), message VARCHAR(255), expire INT, PRIMARY KEY (id) )"; break; case 'sqlite': $db->start_transaction(); $sql = 'CREATE TABLE '.$db_prefix."bans ( id INTEGER NOT NULL, username VARCHAR(200), ip VARCHAR(255), email VARCHAR(50), message VARCHAR(255), expire INTEGER, PRIMARY KEY (id) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'bans. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."categories ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, cat_name VARCHAR(80) NOT NULL DEFAULT 'New Category', disp_position INT(10) NOT NULL DEFAULT 0, PRIMARY KEY (id) ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."categories ( id SERIAL, cat_name VARCHAR(80) NOT NULL DEFAULT 'New Category', disp_position INT NOT NULL DEFAULT 0, PRIMARY KEY (id) )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."categories ( id INTEGER NOT NULL, cat_name VARCHAR(80) NOT NULL DEFAULT 'New Category', disp_position INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (id) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'categories. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."censoring ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, search_for VARCHAR(60) NOT NULL DEFAULT '', replace_with VARCHAR(60) NOT NULL DEFAULT '', PRIMARY KEY (id) ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."censoring ( id SERIAL, search_for VARCHAR(60) NOT NULL DEFAULT '', replace_with VARCHAR(60) NOT NULL DEFAULT '', PRIMARY KEY (id) )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."censoring ( id INTEGER NOT NULL, search_for VARCHAR(60) NOT NULL DEFAULT '', replace_with VARCHAR(60) NOT NULL DEFAULT '', PRIMARY KEY (id) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'censoring. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."config ( conf_name VARCHAR(255) NOT NULL DEFAULT '', conf_value TEXT, PRIMARY KEY (conf_name) ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."config ( conf_name VARCHAR(255) NOT NULL DEFAULT '', conf_value TEXT, PRIMARY KEY (conf_name) )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."config ( conf_name VARCHAR(255) NOT NULL DEFAULT '', conf_value TEXT, PRIMARY KEY (conf_name) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'config. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."forum_perms ( group_id INT(10) NOT NULL DEFAULT 0, forum_id INT(10) NOT NULL DEFAULT 0, read_forum TINYINT(1) NOT NULL DEFAULT 1, post_replies TINYINT(1) NOT NULL DEFAULT 1, post_topics TINYINT(1) NOT NULL DEFAULT 1, PRIMARY KEY (group_id, forum_id) ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."forum_perms ( group_id INT NOT NULL DEFAULT 0, forum_id INT NOT NULL DEFAULT 0, read_forum SMALLINT NOT NULL DEFAULT 1, post_replies SMALLINT NOT NULL DEFAULT 1, post_topics SMALLINT NOT NULL DEFAULT 1, PRIMARY KEY (group_id, forum_id) )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."forum_perms ( group_id INTEGER NOT NULL DEFAULT 0, forum_id INTEGER NOT NULL DEFAULT 0, read_forum INTEGER NOT NULL DEFAULT 1, post_replies INTEGER NOT NULL DEFAULT 1, post_topics INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (group_id, forum_id) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'forum_perms. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."forums ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, forum_name VARCHAR(80) NOT NULL DEFAULT 'New forum', forum_desc TEXT, redirect_url VARCHAR(100), moderators TEXT, num_topics MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, num_posts MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, last_post INT(10) UNSIGNED, last_post_id INT(10) UNSIGNED, last_poster VARCHAR(200), sort_by TINYINT(1) NOT NULL DEFAULT 0, disp_position INT(10) NOT NULL DEFAULT 0, cat_id INT(10) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (id) ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."forums ( id SERIAL, forum_name VARCHAR(80) NOT NULL DEFAULT 'New forum', forum_desc TEXT, redirect_url VARCHAR(100), moderators TEXT, num_topics INT NOT NULL DEFAULT 0, num_posts INT NOT NULL DEFAULT 0, last_post INT, last_post_id INT, last_poster VARCHAR(200), sort_by SMALLINT NOT NULL DEFAULT 0, disp_position INT NOT NULL DEFAULT 0, cat_id INT NOT NULL DEFAULT 0, PRIMARY KEY (id) )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."forums ( id INTEGER NOT NULL, forum_name VARCHAR(80) NOT NULL DEFAULT 'New forum', forum_desc TEXT, redirect_url VARCHAR(100), moderators TEXT, num_topics INTEGER NOT NULL DEFAULT 0, num_posts INTEGER NOT NULL DEFAULT 0, last_post INTEGER, last_post_id INTEGER, last_poster VARCHAR(200), sort_by INTEGER NOT NULL DEFAULT 0, disp_position INTEGER NOT NULL DEFAULT 0, cat_id INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (id) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'forums. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."groups ( g_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, g_title VARCHAR(50) NOT NULL DEFAULT '', g_user_title VARCHAR(50), g_read_board TINYINT(1) NOT NULL DEFAULT 1, g_post_replies TINYINT(1) NOT NULL DEFAULT 1, g_post_topics TINYINT(1) NOT NULL DEFAULT 1, g_post_polls TINYINT(1) NOT NULL DEFAULT 1, g_edit_posts TINYINT(1) NOT NULL DEFAULT 1, g_delete_posts TINYINT(1) NOT NULL DEFAULT 1, g_delete_topics TINYINT(1) NOT NULL DEFAULT 1, g_set_title TINYINT(1) NOT NULL DEFAULT 1, g_search TINYINT(1) NOT NULL DEFAULT 1, g_search_users TINYINT(1) NOT NULL DEFAULT 1, g_edit_subjects_interval SMALLINT(6) NOT NULL DEFAULT 300, g_post_flood SMALLINT(6) NOT NULL DEFAULT 30, g_search_flood SMALLINT(6) NOT NULL DEFAULT 30, PRIMARY KEY (g_id) ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."groups ( g_id SERIAL, g_title VARCHAR(50) NOT NULL DEFAULT '', g_user_title VARCHAR(50), g_read_board SMALLINT NOT NULL DEFAULT 1, g_post_replies SMALLINT NOT NULL DEFAULT 1, g_post_topics SMALLINT NOT NULL DEFAULT 1, g_post_polls SMALLINT NOT NULL DEFAULT 1, g_edit_posts SMALLINT NOT NULL DEFAULT 1, g_delete_posts SMALLINT NOT NULL DEFAULT 1, g_delete_topics SMALLINT NOT NULL DEFAULT 1, g_set_title SMALLINT NOT NULL DEFAULT 1, g_search SMALLINT NOT NULL DEFAULT 1, g_search_users SMALLINT NOT NULL DEFAULT 1, g_edit_subjects_interval SMALLINT NOT NULL DEFAULT 300, g_post_flood SMALLINT NOT NULL DEFAULT 30, g_search_flood SMALLINT NOT NULL DEFAULT 30, PRIMARY KEY (g_id) )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."groups ( g_id INTEGER NOT NULL, g_title VARCHAR(50) NOT NULL DEFAULT '', g_user_title VARCHAR(50), g_read_board INTEGER NOT NULL DEFAULT 1, g_post_replies INTEGER NOT NULL DEFAULT 1, g_post_topics INTEGER NOT NULL DEFAULT 1, g_post_polls INTEGER NOT NULL DEFAULT 1, g_edit_posts INTEGER NOT NULL DEFAULT 1, g_delete_posts INTEGER NOT NULL DEFAULT 1, g_delete_topics INTEGER NOT NULL DEFAULT 1, g_set_title INTEGER NOT NULL DEFAULT 1, g_search INTEGER NOT NULL DEFAULT 1, g_search_users INTEGER NOT NULL DEFAULT 1, g_edit_subjects_interval INTEGER NOT NULL DEFAULT 300, g_post_flood INTEGER NOT NULL DEFAULT 30, g_search_flood INTEGER NOT NULL DEFAULT 30, PRIMARY KEY (g_id) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'groups. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."online ( user_id INT(10) UNSIGNED NOT NULL DEFAULT 1, ident VARCHAR(200) NOT NULL DEFAULT '', logged INT(10) UNSIGNED NOT NULL DEFAULT 0, idle TINYINT(1) NOT NULL DEFAULT 0 ) TYPE=HEAP;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."online ( user_id INT NOT NULL DEFAULT 1, ident VARCHAR(200) NOT NULL DEFAULT '', logged INT NOT NULL DEFAULT 0, idle SMALLINT NOT NULL DEFAULT 0 )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."online ( user_id INTEGER NOT NULL DEFAULT 1, ident VARCHAR(200) NOT NULL DEFAULT '', logged INTEGER NOT NULL DEFAULT 0, idle INTEGER NOT NULL DEFAULT 0 )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'online. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."posts ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, poster VARCHAR(200) NOT NULL DEFAULT '', poster_id INT(10) UNSIGNED NOT NULL DEFAULT 1, poster_ip VARCHAR(15), poster_email VARCHAR(50), message TEXT, hide_smilies TINYINT(1) NOT NULL DEFAULT 0, posted INT(10) UNSIGNED NOT NULL DEFAULT 0, edited INT(10) UNSIGNED, edited_by VARCHAR(200), topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (id) ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."posts ( id SERIAL, poster VARCHAR(200) NOT NULL DEFAULT '', poster_id INT NOT NULL DEFAULT 1, poster_ip VARCHAR(15), poster_email VARCHAR(50), message TEXT, hide_smilies SMALLINT NOT NULL DEFAULT 0, posted INT NOT NULL DEFAULT 0, edited INT, edited_by VARCHAR(200), topic_id INT NOT NULL DEFAULT 0, PRIMARY KEY (id) )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."posts ( id INTEGER NOT NULL, poster VARCHAR(200) NOT NULL DEFAULT '', poster_id INTEGER NOT NULL DEFAULT 1, poster_ip VARCHAR(15), poster_email VARCHAR(50), message TEXT, hide_smilies INTEGER NOT NULL DEFAULT 0, posted INTEGER NOT NULL DEFAULT 0, edited INTEGER, edited_by VARCHAR(200), topic_id INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (id) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'posts. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."ranks ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, rank VARCHAR(50) NOT NULL DEFAULT '', min_posts MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (id) ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."ranks ( id SERIAL, rank VARCHAR(50) NOT NULL DEFAULT '', min_posts INT NOT NULL DEFAULT 0, PRIMARY KEY (id) )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."ranks ( id INTEGER NOT NULL, rank VARCHAR(50) NOT NULL DEFAULT '', min_posts INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (id) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'titles. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."reports ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, forum_id INT(10) UNSIGNED NOT NULL DEFAULT 0, reported_by INT(10) UNSIGNED NOT NULL DEFAULT 0, created INT(10) UNSIGNED NOT NULL DEFAULT 0, message TEXT, zapped INT(10) UNSIGNED, zapped_by INT(10) UNSIGNED, PRIMARY KEY (id) ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."reports ( id SERIAL, post_id INT NOT NULL DEFAULT 0, topic_id INT NOT NULL DEFAULT 0, forum_id INT NOT NULL DEFAULT 0, reported_by INT NOT NULL DEFAULT 0, created INT NOT NULL DEFAULT 0, message TEXT, zapped INT, zapped_by INT, PRIMARY KEY (id) )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."reports ( id INTEGER NOT NULL, post_id INTEGER NOT NULL DEFAULT 0, topic_id INTEGER NOT NULL DEFAULT 0, forum_id INTEGER NOT NULL DEFAULT 0, reported_by INTEGER NOT NULL DEFAULT 0, created INTEGER NOT NULL DEFAULT 0, message TEXT, zapped INTEGER, zapped_by INTEGER, PRIMARY KEY (id) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'reports. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."search_cache ( id INT(10) UNSIGNED NOT NULL DEFAULT 0, ident VARCHAR(200) NOT NULL DEFAULT '', search_data TEXT, PRIMARY KEY (id) ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."search_cache ( id INT NOT NULL DEFAULT 0, ident VARCHAR(200) NOT NULL DEFAULT '', search_data TEXT, PRIMARY KEY (id) )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."search_cache ( id INTEGER NOT NULL DEFAULT 0, ident VARCHAR(200) NOT NULL DEFAULT '', search_data TEXT, PRIMARY KEY (id) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'search_cache. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."search_matches ( post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, word_id MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, subject_match TINYINT(1) NOT NULL DEFAULT 0 ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."search_matches ( post_id INT NOT NULL DEFAULT 0, word_id INT NOT NULL DEFAULT 0, subject_match SMALLINT NOT NULL DEFAULT 0 )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."search_matches ( post_id INTEGER NOT NULL DEFAULT 0, word_id INTEGER NOT NULL DEFAULT 0, subject_match INTEGER NOT NULL DEFAULT 0 )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'search_matches. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."search_words ( id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, word VARCHAR(20) BINARY NOT NULL DEFAULT '', PRIMARY KEY (word), KEY ".$db_prefix."search_words_id_idx (id) ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."search_words ( id SERIAL, word VARCHAR(20) NOT NULL DEFAULT '', PRIMARY KEY (word) )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."search_words ( id INTEGER NOT NULL, word VARCHAR(20) NOT NULL DEFAULT '', PRIMARY KEY (id), UNIQUE (word) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'search_words. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."subscriptions ( user_id INT(10) UNSIGNED NOT NULL DEFAULT 0, topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (user_id, topic_id) ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."subscriptions ( user_id INT NOT NULL DEFAULT 0, topic_id INT NOT NULL DEFAULT 0, PRIMARY KEY (user_id, topic_id) )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."subscriptions ( user_id INTEGER NOT NULL DEFAULT 0, topic_id INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (user_id, topic_id) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'subscriptions. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."topics ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, poster VARCHAR(200) NOT NULL DEFAULT '', subject VARCHAR(255) NOT NULL DEFAULT '', posted INT(10) UNSIGNED NOT NULL DEFAULT 0, last_post INT(10) UNSIGNED NOT NULL DEFAULT 0, last_post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, last_poster VARCHAR(200), num_views MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, num_replies MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, closed TINYINT(1) NOT NULL DEFAULT 0, sticky TINYINT(1) NOT NULL DEFAULT 0, moved_to INT(10) UNSIGNED, forum_id INT(10) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (id) ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."topics ( id SERIAL, poster VARCHAR(200) NOT NULL DEFAULT '', subject VARCHAR(255) NOT NULL DEFAULT '', posted INT NOT NULL DEFAULT 0, last_post INT NOT NULL DEFAULT 0, last_post_id INT NOT NULL DEFAULT 0, last_poster VARCHAR(200), num_views INT NOT NULL DEFAULT 0, num_replies INT NOT NULL DEFAULT 0, closed SMALLINT NOT NULL DEFAULT 0, sticky SMALLINT NOT NULL DEFAULT 0, moved_to INT, forum_id INT NOT NULL DEFAULT 0, PRIMARY KEY (id) )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."topics ( id INTEGER NOT NULL, poster VARCHAR(200) NOT NULL DEFAULT '', subject VARCHAR(255) NOT NULL DEFAULT '', posted INTEGER NOT NULL DEFAULT 0, last_post INTEGER NOT NULL DEFAULT 0, last_post_id INTEGER NOT NULL DEFAULT 0, last_poster VARCHAR(200), num_views INTEGER NOT NULL DEFAULT 0, num_replies INTEGER NOT NULL DEFAULT 0, closed INTEGER NOT NULL DEFAULT 0, sticky INTEGER NOT NULL DEFAULT 0, moved_to INTEGER, forum_id INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (id) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'topics. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); switch ($db_type) { case 'mysql': case 'mysqli': $sql = 'CREATE TABLE '.$db_prefix."users ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, group_id INT(10) UNSIGNED NOT NULL DEFAULT 4, username VARCHAR(200) NOT NULL DEFAULT '', password VARCHAR(40) NOT NULL DEFAULT '', email VARCHAR(50) NOT NULL DEFAULT '', title VARCHAR(50), realname VARCHAR(40), url VARCHAR(100), jabber VARCHAR(75), icq VARCHAR(12), msn VARCHAR(50), aim VARCHAR(30), yahoo VARCHAR(30), location VARCHAR(30), use_avatar TINYINT(1) NOT NULL DEFAULT 0, signature TEXT, disp_topics TINYINT(3) UNSIGNED, disp_posts TINYINT(3) UNSIGNED, email_setting TINYINT(1) NOT NULL DEFAULT 1, save_pass TINYINT(1) NOT NULL DEFAULT 1, notify_with_post TINYINT(1) NOT NULL DEFAULT 0, show_smilies TINYINT(1) NOT NULL DEFAULT 1, show_img TINYINT(1) NOT NULL DEFAULT 1, show_img_sig TINYINT(1) NOT NULL DEFAULT 1, show_avatars TINYINT(1) NOT NULL DEFAULT 1, show_sig TINYINT(1) NOT NULL DEFAULT 1, timezone FLOAT NOT NULL DEFAULT 0, language VARCHAR(25) NOT NULL DEFAULT 'English', style VARCHAR(25) NOT NULL DEFAULT 'Oxygen', num_posts INT(10) UNSIGNED NOT NULL DEFAULT 0, last_post INT(10) UNSIGNED, registered INT(10) UNSIGNED NOT NULL DEFAULT 0, registration_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', last_visit INT(10) UNSIGNED NOT NULL DEFAULT 0, admin_note VARCHAR(30), activate_string VARCHAR(50), activate_key VARCHAR(8), PRIMARY KEY (id) ) TYPE=MyISAM;"; break; case 'pgsql': $sql = 'CREATE TABLE '.$db_prefix."users ( id SERIAL, group_id INT NOT NULL DEFAULT 4, username VARCHAR(200) NOT NULL DEFAULT '', password VARCHAR(40) NOT NULL DEFAULT '', email VARCHAR(50) NOT NULL DEFAULT '', title VARCHAR(50), realname VARCHAR(40), url VARCHAR(100), jabber VARCHAR(75), icq VARCHAR(12), msn VARCHAR(50), aim VARCHAR(30), yahoo VARCHAR(30), location VARCHAR(30), use_avatar SMALLINT NOT NULL DEFAULT 0, signature TEXT, disp_topics SMALLINT, disp_posts SMALLINT, email_setting SMALLINT NOT NULL DEFAULT 1, save_pass SMALLINT NOT NULL DEFAULT 1, notify_with_post SMALLINT NOT NULL DEFAULT 0, show_smilies SMALLINT NOT NULL DEFAULT 1, show_img SMALLINT NOT NULL DEFAULT 1, show_img_sig SMALLINT NOT NULL DEFAULT 1, show_avatars SMALLINT NOT NULL DEFAULT 1, show_sig SMALLINT NOT NULL DEFAULT 1, timezone REAL NOT NULL DEFAULT 0, language VARCHAR(25) NOT NULL DEFAULT 'English', style VARCHAR(25) NOT NULL DEFAULT 'Oxygen', num_posts INT NOT NULL DEFAULT 0, last_post INT, registered INT NOT NULL DEFAULT 0, registration_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', last_visit INT NOT NULL DEFAULT 0, admin_note VARCHAR(30), activate_string VARCHAR(50), activate_key VARCHAR(8), PRIMARY KEY (id) )"; break; case 'sqlite': $sql = 'CREATE TABLE '.$db_prefix."users ( id INTEGER NOT NULL, group_id INTEGER NOT NULL DEFAULT 4, username VARCHAR(200) NOT NULL DEFAULT '', password VARCHAR(40) NOT NULL DEFAULT '', email VARCHAR(50) NOT NULL DEFAULT '', title VARCHAR(50), realname VARCHAR(40), url VARCHAR(100), jabber VARCHAR(75), icq VARCHAR(12), msn VARCHAR(50), aim VARCHAR(30), yahoo VARCHAR(30), location VARCHAR(30), use_avatar INTEGER NOT NULL DEFAULT 0, signature TEXT, disp_topics INTEGER, disp_posts INTEGER, email_setting INTEGER NOT NULL DEFAULT 1, save_pass INTEGER NOT NULL DEFAULT 1, notify_with_post INTEGER NOT NULL DEFAULT 0, show_smilies INTEGER NOT NULL DEFAULT 1, show_img INTEGER NOT NULL DEFAULT 1, show_img_sig INTEGER NOT NULL DEFAULT 1, show_avatars INTEGER NOT NULL DEFAULT 1, show_sig INTEGER NOT NULL DEFAULT 1, timezone FLOAT NOT NULL DEFAULT 0, language VARCHAR(25) NOT NULL DEFAULT 'English', style VARCHAR(25) NOT NULL DEFAULT 'Oxygen', num_posts INTEGER NOT NULL DEFAULT 0, last_post INTEGER, registered INTEGER NOT NULL DEFAULT 0, registration_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', last_visit INTEGER NOT NULL DEFAULT 0, admin_note VARCHAR(30), activate_string VARCHAR(50), activate_key VARCHAR(8), PRIMARY KEY (id) )"; break; } $db->query($sql) or error('Unable to create table '.$db_prefix.'users. Please check your settings and try again.', __FILE__, __LINE__, $db->error()); // Add some indexes switch ($db_type) { case 'mysql': case 'mysqli': // We use MySQL's ALTER TABLE ... ADD INDEX syntax instead of CREATE INDEX to avoid problems with users lacking the INDEX privilege $queries[] = 'ALTER TABLE '.$db_prefix.'online ADD UNIQUE INDEX '.$db_prefix.'online_user_id_ident_idx(user_id,ident)'; $queries[] = 'ALTER TABLE '.$db_prefix.'online ADD INDEX '.$db_prefix.'online_user_id_idx(user_id)'; $queries[] = 'ALTER TABLE '.$db_prefix.'posts ADD INDEX '.$db_prefix.'posts_topic_id_idx(topic_id)'; $queries[] = 'ALTER TABLE '.$db_prefix.'posts ADD INDEX '.$db_prefix.'posts_multi_idx(poster_id, topic_id)'; $queries[] = 'ALTER TABLE '.$db_prefix.'reports ADD INDEX '.$db_prefix.'reports_zapped_idx(zapped)'; $queries[] = 'ALTER TABLE '.$db_prefix.'search_matches ADD INDEX '.$db_prefix.'search_matches_word_id_idx(word_id)'; $queries[] = 'ALTER TABLE '.$db_prefix.'search_matches ADD INDEX '.$db_prefix.'search_matches_post_id_idx(post_id)'; $queries[] = 'ALTER TABLE '.$db_prefix.'topics ADD INDEX '.$db_prefix.'topics_forum_id_idx(forum_id)'; $queries[] = 'ALTER TABLE '.$db_prefix.'topics ADD INDEX '.$db_prefix.'topics_moved_to_idx(moved_to)'; $queries[] = 'ALTER TABLE '.$db_prefix.'users ADD INDEX '.$db_prefix.'users_registered_idx(registered)'; $queries[] = 'ALTER TABLE '.$db_prefix.'search_cache ADD INDEX '.$db_prefix.'search_cache_ident_idx(ident(8))'; $queries[] = 'ALTER TABLE '.$db_prefix.'users ADD INDEX '.$db_prefix.'users_username_idx(username(8))'; break; default: $queries[] = 'CREATE INDEX '.$db_prefix.'online_user_id_idx ON '.$db_prefix.'online(user_id)'; $queries[] = 'CREATE INDEX '.$db_prefix.'posts_topic_id_idx ON '.$db_prefix.'posts(topic_id)'; $queries[] = 'CREATE INDEX '.$db_prefix.'posts_multi_idx ON '.$db_prefix.'posts(poster_id, topic_id)'; $queries[] = 'CREATE INDEX '.$db_prefix.'reports_zapped_idx ON '.$db_prefix.'reports(zapped)'; $queries[] = 'CREATE INDEX '.$db_prefix.'search_matches_word_id_idx ON '.$db_prefix.'search_matches(word_id)'; $queries[] = 'CREATE INDEX '.$db_prefix.'search_matches_post_id_idx ON '.$db_prefix.'search_matches(post_id)'; $queries[] = 'CREATE INDEX '.$db_prefix.'topics_forum_id_idx ON '.$db_prefix.'topics(forum_id)'; $queries[] = 'CREATE INDEX '.$db_prefix.'topics_moved_to_idx ON '.$db_prefix.'topics(moved_to)'; $queries[] = 'CREATE INDEX '.$db_prefix.'users_registered_idx ON '.$db_prefix.'users(registered)'; $queries[] = 'CREATE INDEX '.$db_prefix.'users_username_idx ON '.$db_prefix.'users(username)'; $queries[] = 'CREATE INDEX '.$db_prefix.'search_cache_ident_idx ON '.$db_prefix.'search_cache(ident)'; $queries[] = 'CREATE INDEX '.$db_prefix.'search_words_id_idx ON '.$db_prefix.'search_words(id)'; break; } @reset($queries); while (list(, $sql) = @each($queries)) $db->query($sql) or error('Unable to create indexes. Please check your configuration and try again.', __FILE__, __LINE__, $db->error()); $now = time(); // Insert the four preset groups $db->query('INSERT INTO '.$db->prefix."groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Administrators', 'Administrator', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0)") or error('Unable to add group', __FILE__, __LINE__, $db->error()); $db->query('INSERT INTO '.$db->prefix."groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Moderators', 'Moderator', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0)") or error('Unable to add group', __FILE__, __LINE__, $db->error()); $db->query('INSERT INTO '.$db->prefix."groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Guest', NULL, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0)") or error('Unable to add group', __FILE__, __LINE__, $db->error()); $db->query('INSERT INTO '.$db->prefix."groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Members', NULL, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 300, 60, 30)") or error('Unable to add group', __FILE__, __LINE__, $db->error()); // Insert guest and first admin user $db->query('INSERT INTO '.$db_prefix."users (group_id, username, password, email) VALUES(3, 'Guest', 'Guest', 'Guest')") or error('Unable to add guest user. Please check your configuration and try again.'); $db->query('INSERT INTO '.$db_prefix."users (group_id, username, password, email, num_posts, last_post, registered, registration_ip, last_visit) VALUES(1, '".$db->escape($username)."', '".pun_hash($password1)."', '$email', 1, ".$now.", ".$now.", '127.0.0.1', ".$now.')') or error('Unable to add administrator user. Please check your configuration and try again.'); // Insert config data $config = array( 'o_cur_version' => "'$punbb_version'", 'o_board_title' => "'My PunBB forum'", 'o_board_desc' => "'Unfortunately no one can be told what PunBB is - you have to see it for yourself.'", 'o_server_timezone' => "'0'", 'o_time_format' => "'H:i:s'", 'o_date_format' => "'Y-m-d'", 'o_timeout_visit' => "'600'", 'o_timeout_online' => "'300'", 'o_redirect_delay' => "'1'", 'o_show_version' => "'0'", 'o_show_user_info' => "'1'", 'o_show_post_count' => "'1'", 'o_smilies' => "'1'", 'o_smilies_sig' => "'1'", 'o_make_links' => "'1'", 'o_default_lang' => "'English'", 'o_default_style' => "'Oxygen'", 'o_default_user_group' => "'4'", 'o_topic_review' => "'15'", 'o_disp_topics_default' => "'30'", 'o_disp_posts_default' => "'25'", 'o_indent_num_spaces' => "'4'", 'o_quickpost' => "'1'", 'o_users_online' => "'1'", 'o_censoring' => "'0'", 'o_ranks' => "'1'", 'o_show_dot' => "'0'", 'o_quickjump' => "'1'", 'o_gzip' => "'0'", 'o_additional_navlinks' => "''", 'o_report_method' => "'0'", 'o_regs_report' => "'0'", 'o_mailing_list' => "'$email'", 'o_avatars' => "'1'", 'o_avatars_dir' => "'img/avatars'", 'o_avatars_width' => "'60'", 'o_avatars_height' => "'60'", 'o_avatars_size' => "'10240'", 'o_search_all_forums' => "'1'", 'o_base_url' => "'$base_url'", 'o_admin_email' => "'$email'", 'o_webmaster_email' => "'$email'", 'o_subscriptions' => "'1'", 'o_smtp_host' => "NULL", 'o_smtp_user' => "NULL", 'o_smtp_pass' => "NULL", 'o_regs_allow' => "'1'", 'o_regs_verify' => "'0'", 'o_announcement' => "'0'", 'o_announcement_message' => "'Enter your announcement here.'", 'o_rules' => "'0'", 'o_rules_message' => "'Enter your rules here.'", 'o_maintenance' => "'0'", 'o_maintenance_message' => "'The forums are temporarily down for maintenance. Please try again in a few minutes.
\\n
\\n/Administrator'", 'p_mod_edit_users' => "'1'", 'p_mod_rename_users' => "'0'", 'p_mod_change_passwords' => "'0'", 'p_mod_ban_users' => "'0'", 'p_message_bbcode' => "'1'", 'p_message_img_tag' => "'1'", 'p_message_all_caps' => "'1'", 'p_subject_all_caps' => "'1'", 'p_sig_all_caps' => "'1'", 'p_sig_bbcode' => "'1'", 'p_sig_img_tag' => "'0'", 'p_sig_length' => "'400'", 'p_sig_lines' => "'4'", 'p_allow_banned_email' => "'1'", 'p_allow_dupe_email' => "'0'", 'p_force_guest_email' => "'1'" ); while (list($conf_name, $conf_value) = @each($config)) { $db->query('INSERT INTO '.$db_prefix."config (conf_name, conf_value) VALUES('$conf_name', $conf_value)") or error('Unable to insert into table '.$db_prefix.'config. Please check your configuration and try again.'); } // Insert some other default data $db->query('INSERT INTO '.$db_prefix."categories (cat_name, disp_position) VALUES('Test category', 1)") or error('Unable to insert into table '.$db_prefix.'categories. Please check your configuration and try again.'); $db->query('INSERT INTO '.$db_prefix."forums (forum_name, forum_desc, num_topics, num_posts, last_post, last_post_id, last_poster, disp_position, cat_id) VALUES('Test forum', 'This is just a test forum', 1, 1, ".$now.", 1, '".$db->escape($username)."', 1, 1)") or error('Unable to insert into table '.$db_prefix.'forums. Please check your configuration and try again.'); $db->query('INSERT INTO '.$db_prefix."topics (poster, subject, posted, last_post, last_post_id, last_poster, forum_id) VALUES('".$db->escape($username)."', 'Test post', ".$now.", ".$now.", 1, '".$db->escape($username)."', 1)") or error('Unable to insert into table '.$db_prefix.'topics. Please check your configuration and try again.'); $db->query('INSERT INTO '.$db_prefix."posts (poster, poster_id, poster_ip, message, posted, topic_id) VALUES('".$db->escape($username)."', 2, '127.0.0.1', 'If you are looking at this (which I guess you are), the install of PunBB appears to have worked! Now log in and head over to the administration control panel to configure your forum.', ".$now.', 1)') or error('Unable to insert into table '.$db_prefix.'posts. Please check your configuration and try again.'); $db->query('INSERT INTO '.$db_prefix."ranks (rank, min_posts) VALUES('New member', 0)") or error('Unable to insert into table '.$db_prefix.'ranks. Please check your configuration and try again.'); $db->query('INSERT INTO '.$db_prefix."ranks (rank, min_posts) VALUES('Member', 10)") or error('Unable to insert into table '.$db_prefix.'ranks. Please check your configuration and try again.'); if ($db_type == 'pgsql' || $db_type == 'sqlite') $db->end_transaction(); $alerts = ''; // Check if the cache directory is writable if (!@is_writable('./cache/')) $alerts .= '

The cache directory is currently not writable! In order for PunBB to function properly, the directory named cache must be writable by PHP. Use chmod to set the appropriate directory permissions. If in doubt, chmod to 0777.
'; // Check if default avatar directory is writable if (!@is_writable('./img/avatars/')) $alerts .= '

The avatar directory is currently not writable! If you want users to be able to upload their own avatar images you must see to it that the directory named img/avatars is writable by PHP. You can later choose to save avatar images in a different directory (see Admin/Options). Use chmod to set the appropriate directory permissions. If in doubt, chmod to 0777.
'; /// Display config.php and give further instructions $config = '

I can't figure out how to make a MySQL database...

14

Re: Need help to create a PunBB forum!

As has been mentioned, it doesn't look like you have php installed on the server. Why not post a link to your hosting provider then we can check out whether it has everything you need.

15

Re: Need help to create a PunBB forum!

I have installed it, but you know better then me. Could you post a link to where I should install php from?
I haven't connected the forum to cricket.no/forum yet, so it is still in My Documents...
file:///C:/Documents%20and%20Settings/Samid/Mine%20dokumenter/html/Cricket.no%20HTML/Cricket%20Forum/index.php

16 (edited by elbekko 2007-07-02 15:09)

Re: Need help to create a PunBB forum!

http://Cricket.no/Cricket Forum/install.php

17

Re: Need help to create a PunBB forum!

The page cannot be found...?

Re: Need help to create a PunBB forum!

Maybe because you didn't upload it?

19

Re: Need help to create a PunBB forum!

But how should I upload it? Write it in the config.php?
Sorry I'm asking to much questions, but I am a n00b at this! tongue

Anyone who has a video (or a walktrough) that shows everything to do from the beginning?
The other video doesn't show where I should install php from...

20

Re: Need help to create a PunBB forum!

Installing the forum really isn't difficult. I'm assuming you have a hosting service and are not trying to set up a server on your own computer.

1. Use ftp to go to your web space and create a directory called "forum".
2. Upload the contents of PunBB's "upload directory to the the forum directory on your webspace using ftp.
3. Create a database called whatever you like using cpanel or phpmyadmin
4. Change the file permissions of your forum/cache diretory to 777 using your ftp software
5. Change the file permissions of your forum/img/avatars directory to 777 using your ftp software
6. Open your browser and go to http://mywebsite/forum/install.php

If you see a load of code when you try to view http://mywebsite/forum/install.php instead of a web page then you probably don't have php installed. If thats the case there is nothing you can do, its up to your hosting service to provide php.

Do Not
1. Try to install punbb as part of your website on your own PC and then try and synchronise with your web space.
2. Absolutely do not try and do anything with PunBB using Frontpage, Dreamweaver or similar.

21

Re: Need help to create a PunBB forum!

Thanks! big_smile
But I can't figure out nr. 3! I can't find out where on Cpanel I have to create the database. I have searched on the hole website (www.cpanel.net), but can't find it out!

22

Re: Need help to create a PunBB forum!

Why are you going to the cpanel website? Just logon to your cpanel at you hosting service and look for the mysql icon. That will give you the control panel for creating the database. If your host didn't provide you with cpanel then they will have provided you with the login instructions for phpmyadmin. If they didn't then you will have to ask your host to create the database for you.

23 (edited by Lati@s 2007-07-03 17:46)

Re: Need help to create a PunBB forum!

I am already logged in, but I can't find that MySQL icon.
I came to https://www.cpanel.net/store/index.cgi when I log on...

EDIT: Ahhh.... Okay, I get it now. I will try to do it by myself now! wink
Thanks for the help! smile

24

Re: Need help to create a PunBB forum!

Thats just the cpanel store. You have to logon to the control panel installed on your web hosting service.

25

Re: Need help to create a PunBB forum!

Paul wrote:

As has been mentioned, it doesn't look like you have php installed on the server. Why not post a link to your hosting provider then we can check out whether it has everything you need.

Do you mean http://www.increo.no/ ?