差别
这里会显示出您选择的修订版和当前版本之间的差别。
faq [2013/12/12 15:14] fen [常见问题] |
faq [2013/12/28 04:22] (当前版本) fen 添加自定义附件上传目录 |
||
---|---|---|---|
行 1: | 行 1: | ||
====== 常见问题 ====== | ====== 常见问题 ====== | ||
- | === 分类/标签计数不准 === | + | ===== Apache服务器上的No input file specified错误 ===== |
+ | |||
+ | 在根目录下找到php5.ini文件(如果找不到就建立一个),在里面加上如下内容 | ||
+ | |||
+ | <code conf> | ||
+ | cgi.fix_pathinfo = 1 | ||
+ | </code> | ||
+ | |||
+ | ===== Nginx服务器无法登录后台,出现"405, method not allowed" ===== | ||
+ | |||
+ | 升级nginx至0.7或者0.7以上的版本即可 | ||
+ | |||
+ | ===== Nginx服务器无法登录后台,点击前台链接或者后台登录时出现"404, not found" ===== | ||
+ | |||
+ | 一般的出现这种情况时,nginx.conf里的的location设置都是类似这样 | ||
+ | |||
+ | <code conf> | ||
+ | location ~ .*\.php$ | ||
+ | </code> | ||
+ | |||
+ | 要支持pathinfo,要改成 | ||
+ | <code conf> | ||
+ | location ~ .*\.php(\/.*)*$ | ||
+ | </code> | ||
+ | |||
+ | 在某些老版本的php里面,可能还要打开php.ini里的cgi.fix_pathinfo | ||
+ | |||
+ | <code conf> | ||
+ | cgi.fix_pathinfo = 1 | ||
+ | </code> | ||
+ | |||
+ | ===== Nginx服务器无法实现伪静态化,在后台设置不成功 ===== | ||
+ | |||
+ | 这主要是nginx的rewrite没有设置导致的 | ||
+ | |||
+ | 在nginx.conf里找到网站的server配置段,一般我们推荐如下的配置 | ||
+ | |||
+ | <code conf> | ||
+ | server { | ||
+ | listen 80; | ||
+ | server_name yourdomain.com; | ||
+ | root /home/yourdomain/www/; | ||
+ | index index.html index.htm index.php; | ||
+ | |||
+ | if (!-e $request_filename) { | ||
+ | rewrite ^(.*)$ /index.php$1 last; | ||
+ | } | ||
+ | |||
+ | location ~ .*\.php(\/.*)*$ { | ||
+ | include fastcgi.conf; | ||
+ | fastcgi_pass 127.0.0.1:9000; | ||
+ | } | ||
+ | |||
+ | access_log logs/yourdomain.log combined; | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | :!:**注意把以上配置中的yourdomain换成你自己的实际域名和实际目录存放地址** | ||
+ | |||
+ | ===== 分类/标签计数不准 ===== | ||
解决方法:选择所有的分类/标签,点击【选中项】->【刷新】即可。 | 解决方法:选择所有的分类/标签,点击【选中项】->【刷新】即可。 | ||
- | === 网站提示 500 错误 === | ||
- | - 原因 1:找不到模板。解决方法:进入后台,重新选择模板。 | + | ===== 如何自定义附件上传目录 ===== |
- | ===== 服务器环境常见问题 ===== | + | 在 ''config.inc.php'' 里新增一行下列代码即可,其中 ''your_upload_dir'' 是你要上传的目录: |
- | 所有有关服务器的配置问题,[[servers|请参考这里]] | + | <code> |
+ | define('__TYPECHO_UPLOAD_DIR__', 'your_upload_dir'); | ||
+ | </code> | ||
+ | ===== 升级完后网站提示 500 错误 ===== | ||
+ | |||
+ | - 原因 1:找不到模板。解决方法:进入后台,重新选择模板。 | ||
+ | - 原因 2:权限问题。解决方法:对 typecho 目录重新设定权限 ''chmod -Rf 644 *'',如果还不行,就执行 ''chmod -Rf 755 *'' |