Actions

Installation FAQ/zh-hant: Difference between revisions

From LimeSurvey Manual

(Updating to match new version of source page)
(Updating to match new version of source page)
Line 77: Line 77:
'''Solution:''' Re-upload all files using the binary mode of your FTP program.
'''Solution:''' Re-upload all files using the binary mode of your FTP program.


=After Database Creation=
=After database creation=


==Blank Page after Database Creation==
==Blank page after database creation==


===Symptoms===
===Symptoms===

Revision as of 14:51, 1 May 2013

Contents:

During installation

如果我無法透過安裝程序建立數據庫,怎麼辦?

一般而言, 安裝程序會自動建立全新的數據庫及資料表結構,但若果您的伺服器/ISP 不給與您管理 MySQL 數據庫的權限去建立資料表,您就需要向伺服器供應商聯絡,確保它們為您建立所需的數據庫. 它們或許會為您建立空白的數據庫,然後讓您有存取的權限 (ie: read/write/create). 輸入數據庫的名稱,並在 config.php 檔案內設定用戶名稱及密碼, 然後就可以執行 admin.php 程序. 安裝過程需要在數據庫逐筆建立所需的資料表。

create database <your_database_name>;

create user <your_database_username>;

create user <your_database_username>@localhost;

set password for <your_database_username> = PASSWORD('<your_database_password>');

set password for <your_database_username>@localhost = PASSWORD('<your_database_password>');

grant all on <your_database_name>.* to '<your_database_username>';

grant all on <your_database_name>.* to '<your_database_username>'@'localhost';

You have to replace <your_database_name>, <your_database_username> and <your_database_password> in above commands with according values.

我應該設定甚麼權限?

/limesurvey/tmp 目錄需要設定 read/write/execute  的使用權限 (chmod 777) - 本目錄存放所有上傳檔案及暫時建立的檔案. 其他全部目錄及檔案可以設定為 read/execute 的使用權限 (chmod 755). 但是 如果您想使用內建的 apache 安全工具 (去建立 htpasswd 及 htaccess 檔案) admin 目錄就需要設定成 read/write/execute (777). admin 目錄裏面的檔案則可以設定成 read/execute (chmod 755).

mbstring (Multibyte String Functions) library 是甚麼?

The mbstring library 是 PHP 函數程序庫,可以把字元集轉換語言. 如果你要執行 LimeSurvey.,京可能用得上它。 想檢視一下是否已安裝這個函數程序庫,你可以在網站空間建立一個 test.php 檔案,內容如下︰

 <?php phpinfo(); ?>

然後用瀏覽器打開檔案,你會看到一些信息. 查看字串 'mbstring'. 如果找得到,請繼續. 如果你找不到,可能出於以下的原因︰

If you find the mbstring section then all should be well and you can continue on with your LimeSurvey installation!

If you don't find the mbstring section you might have a problem on your hands.

然後用瀏覽器打開檔案,你會看到一些信息. 查看字串 'mbstring'. 如果找得到,請繼續. 如果你找不到,可能出於以下的原因︰

  • 問題出在伺服器供應商. 向它請求啟用 php 內的該項延伸功能. 如果它介以客為尊,就可以照樣辦得到。
  • 問題出在你的 Linux 伺服器. 你要重新編譯 PHP ,並包含 mbstring library. 可以請救 Linux 專家的做法.
    • 如果使用支援 'yum' (CentOS, RedHat, Fedora) 的Linux 系統, 你可以容易使用到終端機鍵入:
      • yum install php-mbstring
    • 安裝後必須重新啟動 apache:
      • /etc/init.d/httpd restart
  • 問題出在你的 windows 伺服器. Oh.. 這容易之至. 在系統搜尋 php.ini 檔案, 然後用編輯器打開它去搜尋 mbstring. 通常這一句的句首會有分號標示為註腳. 只需要移除這個分號,存檔,然後把伺服器重新開機即可。

當我在問卷輸入特別的字符 (例如是中文、希臘文等)並儲存後, 內容都變成問號?

原因是數據庫建立時未有配合 UTF-8 的字符格式,尤其是透過後台管理界面建立的數據庫往往會出現這種情況。你只需透過 phpMyAdmin 執行以下的  SQL 命令就可修正數據庫不能顯示中文的問題.

ALTER DATABASE `<your_database_name>` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

其中把 <your_database_name> 更改為你現時的 LimeSurvey 數據庫名稱.

Blank page when accessing the Install page

The problem is not with the LimeSurvey installation but with the PHP installation.

  • Verify you have the MySQL PHP module (php-mysql) installed.
  • Verify your PHP install is loading the PHP.ini file your are modifying and not parsing other PHP.INI files on your system.
  • Verify the location and permissions of the following setting in your PHP.ini
upload_tmp_dir="/temp"

session.save_path="/temp"
  • Verify your server runs a suitable PHP version (e.g. this "blank page" problem appeared with PHP v4.4 and LimeSurvey v2.00+).

Error messages because of non-existing resources

Sometimes files are not uploaded correctly or were broken during upload. This leads to several different error messages. Most of them refer to a file or function within a file which can't be found.

Solution: Re-upload all files using the binary mode of your FTP program.

After database creation

Blank page after database creation

Symptoms

  • LimeSurvey installed OK, and database was created, but instead of the admin page, you get an empty page
  • Web surver log shows "Fatal error: Call to a member function on a non-object in /path/to/limesurvey/admin/login_check.php on line 69"

Fix

This is probably an incorrect setting for $rooturl or $rootdir in config.php. In particular, config.php attempts to set $rootdir correctly by calling dirname('''FILE''') and while this usually works, it can be upset when LimeSurvey is installed in a user's home or public_html directory and the home directory is mounted over NFS. Try setting $rootdir manually, and in particular, while your shell or pwd command may show a path like "/disks/hostname/home/username/public_html/limesurvey", try using "/home/username/public_html/limesurvey".

When accessing admin page, the browser keeps running and will eventually fail to show it

Symptoms

  • LimeSurvey installed OK and database was created. But when you access the admin page, the browser keeps running and will eventually fail to show the page.
  • When you check the web server access log, its size has become so big (in some cases, more than 2 GB).
  • Inside the access log, you get this message filling the log.

Warning: fread() [function.fread]: Length parameter must be greater than 0 in /limesurvey/classes/php-gettext/streams.php on line 120

Note: line number may be different depending on your LimeSurvey version.

Fix

This may be caused by the mbstring.func_overload setting. Check the setting in your php.ini and set as the following.

mbstring.func_overload = 0

Note: This means no function overloading. See PHP manual for this setting: Function Overloading Feature

When accessing admin page, the browser reports Fatal error: Call to a member function gT() on a non-object in login_check.php on line 76

Symptoms

  • LimeSurvey installed OK and database was created. But when rdirected to the admin page, the browser displayed the the listed error.
  • $rootdir and $rooturl are correctly set in config.php.
  • The disk path name for limesurvey installation directory includes one of the following characters: ()+

Note: Other characters may also induce the same behaviour

Fix

Move / rename the limesurvey installation directory so that pathname does not include either the ( or ) characters

After installation

For all issues happening after a successful installation please refer to the Troubleshooting page.