安裝好Ubuntu Server中文語系後,常常會發現指令都會出現亂碼或者是菱形符號。
最好將語系變更為英文語系,至少還有正確英文可解讀訊息。
2014年9月7日 星期日
2014年9月4日 星期四
2014年9月3日 星期三
drupal讓使用者在關閉瀏覽器時即自動登出
修改settings.php
如果settings.php是唯讀的檔案
(編輯時出現""W10: Warning: Changing a readonly file""此訊息)
則可以先設定settings.php具有寫入的權限
$sudo chmod a+w /var/www/html/sites/default/settings.php
然後編輯settings.php
$sudo vim var/www/html/sites/default/settings.php
在settings.php檔案內容中,找到
ini_set('session.cookie_lifetime', 2000000);
修改成
ini_set('session.cookie_lifetime', 0);
存檔後關閉檔案,
那使用者在關閉瀏覽器時就會自動登出。
如果settings.php是唯讀的檔案
(編輯時出現""W10: Warning: Changing a readonly file""此訊息)
則可以先設定settings.php具有寫入的權限
$sudo chmod a+w /var/www/html/sites/default/settings.php
然後編輯settings.php
$sudo vim var/www/html/sites/default/settings.php
在settings.php檔案內容中,找到
ini_set('session.cookie_lifetime', 2000000);
修改成
ini_set('session.cookie_lifetime', 0);
存檔後關閉檔案,
那使用者在關閉瀏覽器時就會自動登出。
2014年9月2日 星期二
ubuntu server 14 php.ini "/etc/php5/apache2/php.in"
rt@ubundru:/etc/php5/apache2# ls
conf.d php.ini
rt@ubundru:/etc/php5/apache2# vim php.ini
conf.d php.ini
rt@ubundru:/etc/php5/apache2# vim php.ini
設定預設首頁檔名:the DirectoryIndex page - 所在路徑及檔案"/etc/apache2/mods-available/dir.conf " @ ubuntu server 14
The DirectoryIndex is the default page served by the server when a user requests an index of a
directory by specifying a forward slash (/) at the end of the directory name.
For example, when a user requests the page http://www.example.com/this_directory/, he or she
will get either the DirectoryIndex page if it exists, a server-generated directory list if it does not and
the Indexes option is specified, or a Permission Denied page if neither is true. The server will try
to find one of the files listed in the DirectoryIndex directive and will return the first one it finds.
If it does not find any of these files and if Options Indexes is set for that directory, the server will
generate and return a list, in HTML format, of the subdirectories and files in the directory. The
default value, found in /etc/apache2/mods-available/dir.conf is "index.html index.cgi index.pl
index.php index.xhtml index.htm". Thus, if Apache2 finds a file in a requested directory matching
any of these names, the first will be displayed.
以上內容摘取自"Ubuntu14serverguide.pdf"
directory by specifying a forward slash (/) at the end of the directory name.
For example, when a user requests the page http://www.example.com/this_directory/, he or she
will get either the DirectoryIndex page if it exists, a server-generated directory list if it does not and
the Indexes option is specified, or a Permission Denied page if neither is true. The server will try
to find one of the files listed in the DirectoryIndex directive and will return the first one it finds.
If it does not find any of these files and if Options Indexes is set for that directory, the server will
generate and return a list, in HTML format, of the subdirectories and files in the directory. The
default value, found in /etc/apache2/mods-available/dir.conf is "index.html index.cgi index.pl
index.php index.xhtml index.htm". Thus, if Apache2 finds a file in a requested directory matching
any of these names, the first will be displayed.
以上內容摘取自"Ubuntu14serverguide.pdf"
2014年9月1日 星期一
2014年8月24日 星期日
訂閱:
文章 (Atom)


