简体   繁体   English

cakePHP tmp目录权限

[英]cakePHP tmp directory permissions

Is it OK to set the permission to 777 on the /tmp directory and its sub-directories? 是否可以在/tmp目录及其子目录上将权限设置为777 I am using CakePHP version 2.1.0. 我正在使用CakePHP版本2.1.0。

When I try to set 当我尝试设定

Configure::write('debug', 0);

It gives me Error: 它给我错误:

The requested address '/' was not found on this server. 在此服务器上找不到请求的地址“ /”。

But, with debug value of 1 or 2 , it works fine. 但是,调试值为12 ,它可以正常工作。

As I searched for this error I came up with results that it is because of tmp directory permissions. 当我搜索此错误时,我想到的结果是由于tmp目录权限所致。

  1. Make sure you set up your DATABASE_CONFIG is setup correctly (database.php) 确保您正确设置了DATABASE_CONFIG(database.php)

  2. Check that your tmp folder (and all of it's sub folders) are writable (at least chmod 666 on Linux), 检查您的tmp文件夹(及其所有子文件夹)是否可写(在Linux上至少为chmod 666),

  3. While you're there delete all cache files from allof the tmp sub folders 当您在那里时,从所有tmp子文件夹中删除所有缓存文件

After that, if you're still having 之后,如果您仍然

Error: The requested address "/" was not found on this server 错误:在此服务器上找不到请求的地址“ /”

then you're likely to be missing a database table or an include file, so go into your core.php and set: 那么您可能会缺少数据库表或包含文件,因此请进入core.php并设置:

Configure::write('debug', 2);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM