简体   繁体   English

如何修复Apache PHPSESSID err0r?

[英]How do I fix the Apache PHPSESSID err0r?

I am getting the Apache Errors from AWS PHP Library, Here is the error I am getting from Apache error log file, 我从AWS PHP库获取Apache错误,这是从Apache错误日志文件获取的错误,

[Fri Aug 09 15:47:12 2013] [error] Failed to determine HOME directory after trying "sh: 1: cd: can't cd to ~" (exit code 2)
[Fri Aug 09 15:47:12 2013] [error] PHPSESSID f97oht9qlsuvknc45t075hohn5
[Fri Aug 09 15:47:12 2013] [error] f97oht9qlsuvknc45t075hohn5
[Fri Aug 09 15:47:12 2013] [error] f97oht9qlsuvknc45t075hohn5 =

I tried to fix the error with the help of these steps , after that I got the other 3 lines errors, 我尝试通过这些步骤来修复错误,然后我又收到了其他3行错误,

[Fri Aug 09 15:47:12 2013] [error] PHPSESSID f97oht9qlsuvknc45t075hohn5
[Fri Aug 09 15:47:12 2013] [error] f97oht9qlsuvknc45t075hohn5
[Fri Aug 09 15:47:12 2013] [error] f97oht9qlsuvknc45t075hohn5 =

How do I fix these errors? 如何解决这些错误? Thanks for advance help. 感谢您的预先帮助。

If you are using version 1.6.x of the SDK and explicitly providing credentials to the client object (instead of relying the SDK's config discovery mechanism), then you could try using the AWS_DISABLE_CONFIG_AUTO_DISCOVERY constant to circumvent all of the self-discovery code. 如果您正在使用SDK的1.6.x版本,并向客户端对象显式提供凭据(而不是依赖于SDK的配置发现机制),则可以尝试使用AWS_DISABLE_CONFIG_AUTO_DISCOVERY常量来规避所有自发现代码。

You must define the constant before you include the SDK. 在包含SDK之前,必须先定义常量。

define('AWS_DISABLE_CONFIG_AUTO_DISCOVERY', true);
require '/path/to/sdk.class.php';

This will remove the need of the hack as described on isnoop's blog and may also resolve the issue with the other three lines showing up in your log (though I'm not sure why the SDK would cause those lines to appear). 如isoop的博客所述,这将消除对hack的需求,并且还可以通过在日志中显示其他三行来解决该问题(尽管我不确定SDK为什么会导致这些行出现)。

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

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