Thinkphp在Lnmp环境下部署项目先后报错问题解决:_STORAGE_WRITE_ERROR_:./Application/Runtime/Cache/Home/...Access denied.

首先报错:_STORAGE_WRITE_ERROR_:./Application/Runtime/Cache/Home/769e70f2e46f34ceb60619bbda5e4691.php

解决此问题直接在项目目录下给Appliccation目录最高权限

# chmod -R 777 Application/

刷新首页可以正常访问,跳转页面后,然后报错:Access denied.

这是因为ThinkPHPURL_MODEL问题导致ngnix解析问题

# vim /usr/local/php/etc/php.ini
cgi.fix_pathinfo=0   //由0改为1

然后配置nginx.conf

fastcgi_split_path_info  ^(.+\.php)(/.+)$;

然后在对应的域名解析配置中配置

fastcgi_split_path_info ^(.+\.php)(/.+)$;  
fastcgi_param   PATH_INFO   $fastcgi_path_info;  
fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name; 

# service php-fpm restart  //重启php-fpm

问题解决~

posted @ 2018-01-19 09:46  温柔的风  阅读(846)  评论(0编辑  收藏  举报