最后版本 |
您的文本 |
第1行: |
第1行: |
| {{LifeType top}} | | {{LifeType top}} |
|
| |
|
| ===把[[LifeType]]的程式上传到我的[[网站]]之后,要怎么开始安装呢?===
| |
| :当你把LifeType的程式成功的上传到你的网站上后,你必须要执行安装精灵,才能安装LifeType程式。这时候你如果直接看你网站,你将会看到:
| |
| <pre>
| |
| The wizard.php script has to be removed after the installation process.Please remove it first to continue.
| |
| </pre>
| |
| :安装的方式很简单。 直接在[[浏览器]]的网址列输入<nowiki>http://your-blog-url/wizard.php</nowiki>就可以执行安装精灵,然后开始安装了。安装完毕后记得要把wizard.php这个程式删掉,否则你会一直看到上面的讯息。
| |
|
| |
| ===为什么执行安装精灵时,一直出现Error 500的错误呢?===
| |
| :当你发现LifeType上传后,不管执行任何程式都是出现下面的错误讯息:
| |
| <pre>
| |
| Server error! 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
| |
| </pre>
| |
| :这表示你的主机并不支援使用[[.htaccess]]来修改[[Apache]]的设定。如果你是使用[[虚拟主机]]来架设LifeType,那么唯一的解决方式就是把LifeType根目录下的.htacess移除。只是这样子你就无法使用简洁网址与自订网址的功能了。
| |
| :如果这是你自己的主机,那么你可以修改Apache的设定,在httpd.conf加入:
| |
| <pre>
| |
| < Directory "你的LifeType绝对目录" >
| |
| Options Multiviews Options Multiviews
| |
| AllowOverride All AllowOverride All
| |
| Order allow , deny Order allow , deny
| |
| Allow from all Allow from all
| |
| </ Directory > </ Directory >
| |
| </pre>
| |
| :存档后,记得要重新启动Apache,这样你的修改才能生效。
| |
|
| |
| ===为什么安装到步骤二时会出现Table 'xxx_articles' doesn't exist的讯息?===
| |
| :如果你安装到步骤二出现下面的错误讯息:
| |
| <pre>
| |
| 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
| |
| ... ...
| |
| </pre>
| |
| :那代表你自行修改了/config/config.properties.php这个档案,所以LifeType把安装过程当作『程式升级』,而非『全新安装』。解决方式就是重新解压缩把未修改过的config.properties.php上传/复制到LifeType的/config目录,然后重新执行安装精灵(<nowiki> http://your-blog-url/wizard.php</nowiki> )。
| |
|
| |
| ===为什么安装时一直出现failed to open stream的讯息呢?===
| |
| :如果你安装时一直出下面的讯息,那代表你的档案权限不对,所以LifeType无法帮你安装。
| |
| <pre>
| |
| fopen(./tmp/3f4c7de95a680): failed to open stream: Permission denied
| |
| </pre>
| |
| :或是
| |
| <pre>
| |
| Smarty error: problem writing temporary file './tmp/3f4c7de95a680'
| |
| </pre>
| |
| :或是
| |
| <pre>
| |
| touch(): Unable to create file ./tmp/wizard^intro.template because Permission denied
| |
| </pre>
| |
| :或是
| |
| <pre>
| |
| fopen(/Users/oscar/plog/config/config.properties.php): failed to open stream: Permission denied
| |
| </pre>
| |
| :解决方式很简单啦!如果你是在Linux系统下安装,只要透过命令列(你自己的机器)或是FTP (如果你是用虚拟主机)修改下面的目录与档案权限就可以了:
| |
| <pre>
| |
| chmod 777 your-blog-folder/config/config.properties.php
| |
| chmod 777 your-blog-folder/tmp
| |
| </pre>
| |
| :安装后,记得把config.properties.php的档案权限改回644,确保你的LifeType不会被别人读取。
| |
| <pre>
| |
| chmod 644 your-blog-folder/config/config.properties.php chmod 644 your-blog-folder/config/config.properties.php
| |
| </pre>
| |
| :如果,你是在[[Windows]]下安装,你可以在档案总管中移动滑鼠到your-blog-folder/config/config.properties.php这个档案上,按一下右键会跳出选单,在选单上选择『内容』,然后在跳出的对话框中的『一般』标签下面,把唯读这个选项取消就可以了。 安装完后,记得再把唯读这个选项勾选起来,以确保你的网站安全。
| |
|
| |
| ===当我使用/安装的时候,为什么一直出现空白页面或Allowed memory size of 8388608 bytes exhausted的讯息呢?===
| |
| :如果你在安装或是使用LifeType,却突然出现空白页面或是下面的讯息时:
| |
| <pre>
| |
| 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
| |
| </pre>
| |
| :那代表你的[[PHP]]的设定的记忆体使用限制,并不允许LifeType使用超过8MB的记忆体。解决的方式如下:
| |
|
| |
| :1. 如果这是你的机器,那么你可以修改php.ini 。把php.ini中的memory_limit改为下面的设定:
| |
| <pre>
| |
| memory_limit=16M memory_limit=16M
| |
| </pre>
| |
| :2. 如果这是虚拟主机,而你得主机商允许你修改.htaccess ,那么你可以在.htaccess加入:
| |
| <pre>
| |
| php_value memory_limit 16M php_value memory_limit 16M
| |
| </pre>
| |
| :3.最后。如果主机商不允许你修改.htaccess那么你剩下的办法就是修改程式了。请把LifeType根目录下的index.php 、 summary.php 、 rss.php 、 admin.php几个程式全加上:
| |
| <pre>
| |
| ini_set ( "memory_limit" , "16M" ) ; ini_set ( "memory_limit" , "16M" ) ;
| |
| </pre>
| |
|
| |
| ===为什么我上传的档案一直没办法超过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 ,把这两个参数改为:
| |
| <pre>
| |
| post_max_size=10M post_max_size=10M
| |
| upload_max_filesize=10M upload_max_filesize=10M
| |
| </pre>
| |
| :2.如果这是虚拟主机,而你得主机商允许你修改.htaccess ,那么你可以在.htaccess加入:
| |
| <pre>
| |
| php_value post_max_size 10M php_value post_max_size 10M
| |
| php_value upload_max_filesize 10M php_value upload_max_filesize 10M
| |
| </pre>
| |
| :3.最后。如果主机商不允许你修改.htaccess那么你剩下的办法就是修改程式了。请把LifeType根目录下的admin.php加上:
| |
| <pre>
| |
| 1.ini_set ( "post_max_size" , "10M" ) ; ini_set ( "post_max_size" , "10M" ) ;
| |
| 2.ini_set ( "upload_max_filesize" , "10M" ) ; ini_set ( "upload_max_filesize" , "10M" ) ;
| |
| </pre>
| |
| :以上两个方法如果都试过了,却还是没有办法上传10MB的档案,那么可能还有一个地方需要修改,那就是Apache的设定。请把Apache的LimitRequestBody这个参数改为你要的大小,如10000000 (10MB),改过后记得重新启动Apache。可能的参数设定档因不同的系统而异:
| |
| :* Windows :在Apache安装目录的/conf/httpd.conf中
| |
| :* [[Linux]] :在Apache安装目录的/conf/httpd.conf或是conf/php.conf中。可以用下面的Linux指令来搜寻比较快。
| |
| <pre>
| |
| find / -name httpd.conf find / -name httpd.conf
| |
| find / -name php.conf find / -name php.conf
| |
| </pre>
| |
|
| |
| ===我可不可以用summary.php来当作我的首页呢?===
| |
| :summary.php是LifeType特别提供的社群网志资讯汇整页面,要拿他来当作首页,当然是很适合的。
| |
|
| |
| :修改方式很简单,只要修改LifeType安装的根目录下的.htaccess档案,在最前面加上下面的参数设定,就可以了。
| |
| <pre>
| |
| 1.DirectoryIndex summary.php index.html index.php
| |
| </pre>
| |
| :如果你在修改之候,你的浏览器出现Error 500的错误,那代表的是你的Apache不允许你使用.htaccess来覆盖伺服器原先的设定。请参考: 为什么执行安装精灵时,一直出现Error 500的错误呢?来修正。
| |
|
| |
| ===为什么安装完成后我的网页看起来都是乱码 ,我明明是选择繁体中文啊?===
| |
| :当你发现你正常的安装LifeType后,可是你的网页却出现乱码,或是一定要在浏览器中特别指定编码才能看到正常的文字。哪可能是你的Apache指定了网页预设输出编码 。只要把Apache的AddDefaultCharset参数移除就可以解决了。
| |
|
| |
| :请在httpd.conf中寻找AddDefaultCharset这个字串。找到后,在这个参数前面加上#号就可以了。
| |
| <pre>
| |
| 1.#AddDefaultCharset utf-8
| |
| </pre>
| |
| :修改后,记得重新启动Apache,这样才能让你的修改生效。
| |
|
| |
| ===我是LifeType网站的管理者,可是我忘了我的密码,我应该怎么办呢?===
| |
| :恭喜你,这是最不应该发生的错误。但是,如果真的发生了,那么唯一的方法就是重设密码!
| |
|
| |
| :因为LifeType并未直接储存使用者的真实密码,而是储存经由MD5编码过的密码。 这样可以避免当你的网站被『骇』的时候,『骇客』无法取得真实的使用者密码,这是对使用者的保护。
| |
|
| |
| :重设密码的方式必须对资料库的直接操作,你可以透过[[phpMyAdmin]]或是[[MySQL]]命令列的方式来进行。执行下面的SQL来重设你的密码:
| |
| <pre>
| |
| UPDATE plog_users SET password = MD5('your_new_password') WHERE user = 'your_username';
| |
| </pre>
| |
| :plog_是LifeType预设的资料表前置码,你必须更改为你自己的前置码。
| |
|
| |
| ===为什么我重新开启浏览器浏览我的网志就可以看到网志页面,可是当我点下其中的任何连结就会出现空白页呢?===
| |
| :你必须要先察看你的Apache有没有纪录任何错误讯息,如果你发现Apache给你的错误讯息是:
| |
| <pre>
| |
| 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
| |
| </pre>
| |
| :那很有可能你的PHP的session设定错误。解决的方式是把php.ini中的session.auto_start参数设为0。
| |
| <pre>
| |
| session.auto_start = 0
| |
| </pre>
| |
|
| |
| ===我是大陆/台湾的用户,我不想用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.把其中
| |
| <pre>
| |
| 1.$messages [ 'encoding' ] = 'UTF-8' ;
| |
| </pre>
| |
| :改为
| |
| <pre>
| |
| 1.$messages [ 'encoding' ] = 'GB2312' ;
| |
| </pre>
| |
| :或是
| |
| <pre>
| |
| 1.$messages [ 'encoding' ] = 'Big5' ;
| |
| </pre>
| |
| :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编码的网站的文章,在对方的网站就会出现乱码。这实在是很不礼貌的行为啊。
| |
| <pre>
| |
| 所以请不要再问『为什么不用GB2312/Big5当作预设编码? 』这种问题了。
| |
| 没有政治上的考量,也不是技术上的优劣。
| |
| 纯粹是为了加强『国际交流』上的考量啊!
| |
| </pre>
| |
|
| |
| ===请问我可以在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档
| |
| <pre>
| |
| 1.
| |
| ########################### ###########################
| |
| 2.
| |
| Debug 0 Debug 0
| |
| 3.
| |
| Reload 5000 Reload 5000
| |
| 4.
| |
| 5.
| |
| # Permalink to the blog entry (ie /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 (ie /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 (ie /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 (ie /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 (ie /plog/88_userfoo/albums/)
| |
| 18.
| |
| RewriteRule ^/([0- 9 ]+)_[^/]+/albums/$ /index.php?op=ViewAlbum&blogId=$ 1 &albumId=0 [L,NC]
| |
| 19.
| |
| 20. # Category view (ie /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 (ie /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 (ie /plog/3_userfoo/feeds/atom)
| |
| 27.
| |
| RewriteRule ^/([0- 9 ]+)_[^/]+/feeds/(.*)$ /rss.php?blogId=$ 1 &profile=$ 2 [L,NC]
| |
| 28.
| |
| 29.
| |
| # Trackbacks (ie /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 (ie /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 (ie /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 (ie /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 (ie /plog/3_userfoo/demosites)
| |
| 42.
| |
| RewriteRule ^/([0- 9 ]+)_[^/]+/(.+)$/index.php?op=Template&blogId=$ 1 &show=$ 2 [NC]
| |
| 43.
| |
| 44.
| |
| # A non-default blog (ie /plog/88_userfoo)
| |
| 45.
| |
| RewriteRule ^/([0- 9 ]+)(_[^/]+)?$ /index.php?blogId=$ 1 [L,NC]
| |
| 46.
| |
| 47.
| |
| # Daily archive (ie /plog/1_userfoo/archive/20040101.html)
| |
| 48.
| |
| RewriteRule ^/([0- 9 ]+)_[^/]+/archive/([0- 9 ]{ 8 })\.html$ /index.php?blogId=$ 1 &Date=$ 2 [L, NC]
| |
| 49.
| |
| ############################## ##############################
| |
| </pre>
| |
| :4.如果你安装在子目录,例如<nowiki>www.mysite.com/blog/</nowiki> ,记得要把每一行Rewrite的规则都修正为
| |
| <pre>
| |
| RewriteRule ^/blog/([0- 9 ]+)_[^/]+/archive/([0- 9 ]+)_[^.]+\.html$ /blog/index.php?op=ViewArticle&blogId =$ 1 &articleId=$ 2 [L,NC]
| |
| </pre>
| |
| :哪里不同呢?仔细看,有看到吗?每一行Rewrite的规则前面与中间都多了/blog这个子目录喔!
| |
|
| |
| ===我在IIS下已经成功安装LifeType了,可是每次登出时都出现Exception message: session_destroy(): Session object destruction failed ,这是什么问题呢?===
| |
| :那是因为IUSER对php session的资料目录只有写入权限,而没有修改权限所造成的。
| |
|
| |
| :请用phpinfo()查出你的session目录,并且到IIS设定中设定guest对那个目录的权限是可读写以及修改。
| |
|
| |
|
| ==参考来源== | | ==参考来源== |