1 頁 (共 1 頁)

[問題]未啟動資料庫

發表於 : 2003-05-01 15:10
QQ
請問我申請了收費網頁直間架設php論壇.但我一直都未能成功!!
安裝時出現以下info:

phpBB : Critical Error

Could not connect to the database

大約是講我沒有資料庫
=============================
我問過有關網頁空間的人.佢話我未啟動資料庫.

方法是在php的程式裹打入:

PHP Code:

mysql_connect("localhost",zonehit","********");

=============================

但我不明白是在那一個檔案打入.如何打入.

請各位教教我丫!!!

發表於 : 2003-05-01 15:43
sheng98q
你也跟我一樣,我現在也在煩惱中~~~ :cry: :cry:

發表於 : 2003-05-01 16:22
shihchieh
config.php

[php]<?php
<?php


// phpBB 2.x auto-generated config file
// Do not change anything in this file!

$dbms = 'mysql';

$dbhost = 'localhost';
$dbname = '存放phpbb2的路徑';
$dbuser = '帳號';
$dbpasswd = '密碼';

$table_prefix = 'phpbb2用的資料表頭';

define('PHPBB_INSTALLED', true);

?>
?>[/php]

安裝後才發生的話才改上面那個檔
安裝前的話是在安裝畫面時直接輸入~!!

發表於 : 2003-05-01 19:41
QQ
是不是只要打開config.php 貼上去.就可以嗎

發表於 : 2003-05-01 19:44
QQ
存放phpbb2的路徑 和 phpbb2用的資料表頭 是什麼 我不明白

發表於 : 2003-05-01 20:09
shihchieh
QQ 寫:存放phpbb2的路徑 和 phpbb2用的資料表頭 是什麼 我不明白
1.存放phpbb2的路徑,如果是http://xxxxxxx/phpbb2
就打上 phpbb2 就可了
2.phpbb2用的資料表頭指的是 "phpbb_"(此為預設,如果你有改的話就打上你改的那個,雙引號不用打)

範例~

[php]<?php
$dbms = 'mysql';

$dbhost = 'localhost';
$dbname = 'phpbb2';
$dbuser = '帳號';
$dbpasswd = '密碼';

$table_prefix = 'phpbb_';
?>[/php]

另外不是要你貼上去而是修改....開啟檔案就看到了,先作作看

發表於 : 2003-05-01 20:56
QQ
但我打開config.php 是什麼都沒有

發表於 : 2003-05-01 21:52
shihchieh
那就把它貼上去吧...

代碼: 選擇全部

<?php 


// phpBB 2.x auto-generated config file 
// Do not change anything in this file! 

$dbms = 'mysql'; 

$dbhost = 'localhost'; 
$dbname = '存放phpbb2的路徑'; 
$dbuser = '帳號'; 
$dbpasswd = '密碼'; 

$table_prefix = 'phpbb2用的資料表頭'; 

define('PHPBB_INSTALLED', true); 

?> 
空的?我想你應該是安裝完phpbb後,有個下載config.php的檔案,但你沒有回傳到空間去覆蓋的關系吧?!

發表於 : 2003-05-01 22:25
QQ
但我未成功安裝過phpbb.
打完所有info後.按安裝.就出現\r
phpBB : Critical Error

Could not connect to the database

發表於 : 2003-05-01 22:32
小竹子
你確定那個空間有 mysql 嗎?

發表於 : 2003-05-01 22:55
QQ
是!!

發表於 : 2003-05-02 18:50
QQ
跟上面的方法後出現\r
Parse error: parse error in /home/virtual/site60/fst/var/www/html/phpBB/config.php on line 2
phpBB : Critical Error

Could not connect to the database
==============================
資料庫的表格字首 (Prefix): 完本是phpbb_
那如果我的資料庫預設了名為xxxxxxx_net 那要更改嗎??

發表於 : 2003-05-02 18:58
小竹子
重新安裝好嗎?
並說明你的作業系統安裝版本

發表於 : 2003-05-02 19:01
QQ
這是我打入config.php的.看是否正確!!!
=================================
<?php
<?php


// phpBB 2.x auto-generated config file
// Do not change anything in this file!

$dbms = 'mysql';

$dbhost = 'localhost';
$dbname = 'phpBB';
$dbuser = 'zonehit';
$dbpasswd = '123456789;

$table_prefix = 'zonehit_net';

define(' PHPBB_INSTALLED', true);

?>
?>
=================================
紅色字的要更改嗎!!!
bule的字正確嗎??