A-A+

lifetype安装常见问题

2008年10月17日 Lifetype 暂无评论 阅读 668 次浏览 次

把 LifeType 的程式上传到我的网站之后,要怎么开始安装呢?

当你把 LifeType 的程式成功的上传到你的网站上后,你必须要执行安装精灵,才能安装 LifeType 程式。这时候你如果直接看你网站,你将会看到:

The wizard.php script has to be removed after the installation process.
Please remove it first to continue.

安装的方式很简单。直接在浏览器的网址列输入 http://your-blog-url/wizard.php 就可以执行安装精灵,然后开始安装了。安装完毕后记得要把 wizard.php 这个程式删掉,否则你会一直看到上面的讯息喔。

更详细的安装步骤,请参考 使用安装精灵来安装 LifeType 。

为什么执行安装精灵时,一直出现 Error 500 的错误呢?

当你发现 LifeType 上传后,不管执行任何程式都是出现下面的错误讯息:

Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster
Error 500

这表示你的主机并不支援使用 .htaccess 来修改 Apache 的设定。如果你是使用虚拟主机来架设 LifeType,那么唯一的解决方式就是把 LifeType 根目录下的 .htacess 移除。只是这样子你就无法使用简洁网址与自订网址的功能了。

如果这是你自己的主机,那么你可以修改 Apache 的设定,在 httpd.conf 加入:

 


  1. <Directory "你的 LifeType 绝对目录">
  2. Options Multiviews
  3. AllowOverride All
  4. Order allow,deny
  5. Allow from all
  6. </Directory>

存档后,记得要重新启动 Apache,这样你的修改才能生效喔。

为什么安装到步骤二时会出现 Table 'xxx_articles' doesn't exist 的讯息?

如果你安装到步骤二出现下面的错误讯息:

New table Map of categories to articles created successfully.
New table Definition of custom fields created successfully.
New table Custom fields that have been assigned to articles created successfully.
New table Text of the articles created successfully.
** New tables created successfully **
Error modifying table Articles: Table 'plog_articles' doesn't exist
Table 'plog_articles' doesn't exist
Table 'plog_articles' doesn't exist
...

那代表你自行修改了 /config/config.properties.php 这个档案,所以 LifeType 把安装过程当作『程式升级』,而非『全新安装』。解决方式就是重新解压缩把未修改过的 config.properties.php 上传/复制到 LifeType 的 /config 目录,然后重新执行安装精灵(http://your-blog-url/wizard.php)。

为什么安装时一直出现 failed to open stream 的讯息呢?

如果你安装时一直出下面的讯息,那代表你的档案权限不对,所以 LifeType 无法帮你安装。

fopen(./tmp/3f4c7de95a680): failed to open stream: Permission denied

或是

Smarty error: problem writing temporary file './tmp/3f4c7de95a680'

或是

touch(): Unable to create file ./tmp/wizard^intro.template because Permission denied

或是

fopen(/Users/oscar/plog/config/config.properties.php): failed to open stream: Permission denied

解决方式很简单啦!如果你是在 Linux 系统下安装,只要透过命令列(你自己的机器)或是 FTP (如果你是用虚拟主机)修改下面的目录与档案权限就可以了:

chmod 777 your-blog-folder/config/config.properties.php
chmod 777 your-blog-folder/tmp

安装后,记得把 config.properties.php 的档案权限改回 644,确保你的 LifeType 不会被别人读取。

chmod 644 your-blog-folder/config/config.properties.php

如果,你是在 Windows 下安装,你可以在档案总管中移动滑鼠到 your-blog-folder/config/config.properties.php 这个档案上,按一下右键会跳出选单,在选单上选择『内容』,然后在跳出的对话框中的『一般』标籤下面,把 唯读 这个选项取消就可以了。安装完后,记得再把 唯读 这个选项勾选起来,以确保你的网站安全。

当我使用/安装的时候,为什么一直出现 空白页面或 Allowed memory size of 8388608 bytes exhausted 的讯息呢?

如果你在安装或是使用 LifeType,却突然出现空白页面或是下面的讯息时:

Fatal error:  
Allowed memory size of 8388608 bytes exhausted (tried to allocate 11520 bytes) in /var/www/blog/class/template/smarty/Smarty_Compiler.class.php on line 1580

那代表你的 PHP 的设定的记忆体使用限制,并不允许 LifeType 使用超过 8MB 的记忆体。解决的方式如下:

1. 如果这是你的机器,那么你可以修改 php.ini。把 php.ini 中的memory_limit 改为下面的设定:

memory_limit=16M

2. 如果这是虚拟主机,而你得主机商允许你修改 .htaccess,那么你可以在.htaccess 加入:

php_value memory_limit 16M

3. 最后。如果主机商不允许你修改 .htaccess 那么你剩下的办法就是修改程式了。请把 LifeType 根目录下的index.phpsummary.phprss.phpadmin.php 几个程式全加上:

 

ini_set("memory_limit", "16M");

为什么我上传的档案一直没办法超过 2MB 呢?

这要分成两个部分来看了,一个是 LifeType 本身的设定,另一个是 PHP 的设定。

LifeType 的设定,我们可以在管理介面中 全部站台管控 ? 上传设定 ? maximum_file_upload_size 找到上传限制的设定值,预设值是 2000000。在 LifeType 中这个参数的单位是 Byte,所以 2000000 代表的就是 2MB。请把他改成你希望的设定值,例如 10MB,那么就请把他改为 10000000,记得一定要按下『更新』,这个设定值才会生效。

再来就是要更改 PHP 的设定,在 PHP 中共有两个参数 post_max_size 与upload_max_filesize 需要修改:

1. 如果这是你的机器,那么你可以修改 php.ini,把这两个参数改为:

post_max_size=10M
upload_max_filesize=10M

2. 如果这是虚拟主机,而你得主机商允许你修改 .htaccess,那么你可以在.htaccess 加入:

php_value post_max_size 10M
php_value upload_max_filesize 10M

3. 最后。如果主机商不允许你修改 .htaccess 那么你剩下的办法就是修改程式了。请把 LifeType 根目录下的admin.php 加上:

 


  1. ini_set("post_max_size", "10M");
  2. ini_set("upload_max_filesize", "10M");

以上两个方法如果都试过了,却还是没有办法上传 10MB 的档案,那么可能还有一个地方需要修改,那就是 Apache 的设定。请把 Apache 的LimitRequestBody 这个参数改为你要的大小,如 10000000 (10MB),改过后记得重新启动 Apache。可能的参数设定档因不同的系统而异:

  • Windows:在 Apache 安装目录的 /conf/httpd.conf 中
  • Linux:在 Apache 安装目录的 /conf/httpd.conf 或是 conf/php.conf 中。可以用下面的 Linux 指令来搜寻比较快。
find / -name httpd.conf
find / -name php.conf

我可不可以用 summary.php 来当作我的首页呢?

summary.php 是 LifeType 特别提供的社群网志资讯汇整页面,要拿他来当作首页,当然是很适合的。

修改方式很简单,只要修改 LifeType 安装的根目录下的 .htaccess 档案,在最前面加上下面的参数设定,就可以了。

 

DirectoryIndex summary.php index.html index.php

如果你在修改之候,你的浏览器出现 Error 500 的错误,那代表的是你的 Apache 不允许你使用 .htaccess 来覆盖伺服器原先的设定。请参考:为什么执行安装精灵时,一直出现 Error 500 的错误呢? 来修正。

为什么安装完成后 我的网页看起来都是乱码,我明明是选择繁体中文啊?

当你发现你正常的安装 LifeType 后,可是你的网页却出现乱码,或是一定要在浏览器中特别指定编码才能看到正常的文字。哪可能是你的 Apache 指定了 网页预设输出编码。只要把 Apache 的 AddDefaultCharset 参数移除就可以解决了。

请在 httpd.conf 中寻找 AddDefaultCharset 这个字串。找到后,在这个参数前面加上 # 号就可以了。

 

#AddDefaultCharset utf-8

修改后,记得重新启动 Apache,这样才能让你的修改生效。

老天呀!我是 LifeType 网站的管理者,可是我忘了我的密码,我应该怎么办呢?

恭喜你,这是最不应该发生的错误。但是,如果真的发生了,那么唯一的方法就是重设密码!

因为 LifeType 并未直接储存使用者的真实密码,而是储存经由 MD5 编码过的密码。这样可以避免当你的网站被『骇』的时候,『骇客』无法取得真实的使用者密码,这是对使用者的保护。

重设密码的方式必须对资料库的直接操作,你可以透过 phpMyAdmin 或是 MySQL 命令列的方式来进行。执行下面的 SQL 来重设你的密码:

UPDATE plog_users SET password = MD5('your_new_password') WHERE user = 'your_username';

plog_ 是 LifeType 预设的资料表前置码,你必须更改为你自己的前置码。

为什么我重新开启浏览器浏览我的网志就可以看到网志页面,可是当我点下其中的任何连结就会出现空白页呢?

你必须要先察看你的 Apache 有没有纪录任何错误讯息,如果你发现 Apache 给你的错误讯息是:

PHP Fatal error:  Unknown(): The script tried to execute a method or access a property of an incomplete object you are trying to operate on was loaded _before_ the session was started in /usr/home/www/plog/class/action/blogaction.class.php on line 54
PHP Fatal error:  Unknown(): The script tried to execute a method or access a property of an incomplete object you are trying to operate on was loaded _before_ the session was started in/usr/home/www/plog/class/action/blogaction.class.php on line 177

那很有可能你的 PHP 的 session 设定错误。解决的方式是把 php.ini 中 的 session.auto_start 参数设为 0。

session.auto_start = 0

我是大陆/台湾的用户,我不想用 LifeType 内建的 UTF-8 编码,可以改为 GB2312/Big5 编码吗?

可以!可是因为 GB2312/Big5 并非 LifeType 官方支援的编码,所以可能某些功能上会有错误,请自行斟酌使用。

请依下面的步骤来将语系档转为 GB2312/Big5 的编码:

1. 先去下载 ConvertZ ,这是由 ALF 所开发的简繁转换软体,它大概是目前网路上你能找到最棒的软体了。

2. 打开 /locales/locale_zh_CN.class.php(UTF-8 简体中文)或是 /locales/locale_zh_TW.class.php(UTF-8 繁体中文)。

3. 把其中

 

$messages['encoding'] = 'UTF-8';

改为

 

$messages['encoding'] = 'GB2312';

或是

 

$messages['encoding'] = 'Big5';

4. 然后用 ConvertZ 把整个档案转成 GB2312/Big5 的编码 (选用 UTF8->GB2312 或 UTF8->Big5)。

5. 到 全部站台管控 ? 全域设定 与 个人网志设定 ? 网志设定,把预设的语系先改为 en_UK。

6. 再到 全部站台管控 ? 语系档案列表把 zh_CN 或是 zh_TW 语系删除。

7. 然后到 全部站台管控 ? 新增语系,把你修改过的zh_CN 或是 zh_TW 语系新增回 LifeType。

8. 最后再到 全部站台管控 ? 全域设定 与 个人网志设定 ? 网志设定,把预设语系从 en_UK 改回 zh_CN 或是 zh_TW 语系,这样就可以了!

请注意:

  • 为什么要这么麻烦呢?
因为当你安装的时候,LifeType 已将把语系的『编码』资料写到资料库了。 所以,如果你不删除再新增,那么不管你怎么改, LifeType 永远认定他是 GB2312 或 Big5 编码。
  • 另外一个方式,是用改过的语系重新安装,这是最简单的方式了。

但是,我还是诚心建议你使用 UTF-8 编码啦!因为跟国际的 Blogger 们接轨比较不会有问题。例如,引用的时候,如果用 GB2312/Big5 引用 UTF-8 编码的网站的文章,在对方的网站就会出现乱码。这实在是很不礼貌的行为啊。

所以请不要再问『为什么不用 GB2312/Big5 当作预设编码?』这种问题了。
没有政治上的考量,也不是技术上的优劣。
纯粹是为了加强『国际交流』上的考量啊!

请问我可以在 IIS 中使用 LifeType 的 Mod_Rewrite 功能来做简洁网址吗?

可以的。这要感谢 IISMods 这家公司,他们以 Open Source 的方式,释出IIS 的 Mod_Rewrite 模组

安装方式如下:

1. 到 IISMods 下载 URL Rewrite Filter for IIS

2. 参考 Mod_Rewrite 的文件,来把 Mod_Rewrite 装到 IIS 上。

3. 修改 mod_rewrite.ini 档

 


  1. ###########################
  2. Debug 0
  3. Reload 5000
  4.  
  5. # Permalink to the blog entry (i.e. /plog/1_userfoo/archive/3_title-foo-bar.html)
  6. RewriteRule ^/([0-9]+)_[^/]+/archive/([0-9]+)_[^.]+\.html$ /index.php?op=ViewArticle&blogId=$1&articleId=$2 [L,NC]
  7.  
  8. # Monthly archive (i.e. /plog/1_userfoo/archive/200401.html)
  9. RewriteRule ^/([0-9]+)_[^/]+/archive/([0-9]{6})\.html$ /index.php?blogId=$1&Date=$2 [L,NC]
  10.  
  11. # Daily archive (i.e. /plog/1_blogfoo/archive/20040101.html)
  12. RewriteRule ^/([0-9]+)_[^/]+/archive/([0-9]{8})\.html$ /index.php?blogId=$1&Date=$2 [L,NC]
  13.  
  14. # Album (i.e. /plog/88_userfoo/albums/34_title-foo-bar.html)
  15. RewriteRule ^/([0-9]+)_[^/]+/albums/([0-9]+)_[^.]+\.html$ /index.php?op=ViewAlbum&blogId=$1&albumId=$2 [L,NC]
  16.  
  17. # Albums (i.e. /plog/88_userfoo/albums/)
  18. RewriteRule ^/([0-9]+)_[^/]+/albums/$ /index.php?op=ViewAlbum&blogId=$1&albumId=0 [L,NC]
  19.  
  20. # Category view (i.e. /plog/88_userfoo/categories/4_cat-foobar.html)
  21. RewriteRule ^/([0-9]+)_[^/]+/categories/([0-9]+)_[^.]+\.html$ /index.php?blogId=$1&postCategoryId=$2 [L,NC]
  22.  
  23. # Category-Feeds (i.e. /plog/3_userfoo/feeds/categories/2_category/atom)
  24. RewriteRule ^/([0-9]+)_[^/]+/feeds/categories/([0-9]+)_[^.]+/(.*)$ /rss.php?blogId=$1&categoryId=$2&profile=$3 [L,NC]
  25.  
  26. # Feeds (i.e. /plog/3_userfoo/feeds/atom)
  27. RewriteRule ^/([0-9]+)_[^/]+/feeds/(.*)$ /rss.php?blogId=$1&profile=$2 [L,NC]
  28.  
  29. # Trackbacks (i.e. /plog/3_userfoo/trackbacks/34_title-foo-bar.html)
  30. RewriteRule ^/([0-9]+)_[^/]+/trackbacks/([0-9]+)_[^.]+\.html$ /index.php?op=Trackbacks&blogId=$1&articleId=$2 [L,NC]
  31.  
  32. # Comment form (i.e. /plog/88_userfoo/comment/34_title-foo-bar.html)
  33. RewriteRule ^/([0-9]+)_[^/]+/comment/([0-9]+)_[^.]+\.html$ /index.php?op=Comment&blogId=$1&articleId=$2 [L,NC]
  34.  
  35. # Resources (i.e. /plog/88_userfoo/resources/this-is-a-resource-name.pdf.html)
  36. RewriteRule ^/([0-9]+)_[^/]+/resources/([^.]+)\.([^.]+)\.html$ /index.php?op=ViewResource&blogId=$1&resource=$2.$3 [L,NC]
  37.  
  38. # Download a resource (i.e. /plog/88_userfoo/get/this-is-a-resource-name.pdf)
  39. RewriteRule ^/([0-9]+)_[^/]+/get/(.+)$ /resserver.php?blogId=$1&resource=$2 [L,NC]
  40.  
  41. # Static Pages (i.e /plog/3_userfoo/demosites)
  42. RewriteRule ^/([0-9]+)_[^/]+/(.+)$ /index.php?op=Template&blogId=$1&show=$2 [NC]
  43.  
  44. # A non-default blog (i.e. /plog/88_userfoo)
  45. RewriteRule ^/([0-9]+)(_[^/]+)?$ /index.php?blogId=$1 [L,NC]
  46.  
  47. # Daily archive (i.e. /plog/1_userfoo/archive/20040101.html)
  48. RewriteRule ^/([0-9]+)_[^/]+/archive/([0-9]{8})\.html$ /index.php?blogId=$1&Date=$2 [L,NC]
  49. ##############################

4. 如果你安装在子目录,例如 www.mysite.com/blog/,记得要把每一行 Rewrite 的规则都修正为

 

RewriteRule ^/blog/([0-9]+)_[^/]+/archive/([0-9]+)_[^.]+\.html$ /blog/index.php?op=ViewArticle&blogId=$1&articleId=$2 [L,NC]

哪里不同呢?仔细看,有看到吗?每一行 Rewrite 的规则前面与中间都多了/blog 这个子目录喔!

全文出处:IIS & Mod_Rewrite - How to get it working

 

我在 IIS 下已经成功安装 LifeType 了,可是每次登出时都出现 Exception message: session_destroy(): Session object destruction failed,这是什么问题呢?

那是因为 IUSER 对 php session 的资料目录只有写入权限,而没有修改权限所造成的。

请用 phpinfo() 查出你的 session 目录,并且到 IIS 设定中设定 guest 对那个目录的权限是可读写以及修改。

 

标签:

评论已关闭!

Copyright © 香港虚拟主机_美国虚拟主机_香港服务器_美国服务器租用托管 保留所有权利.   Theme  Ality 蜀ICP备14006632号-1

用户登录