Laravel 5.1 - HHVM - S3Exception在WrappedHttpHandler.php线152HHVM、Laravel、S3Exception、php

2023-09-11 10:04:55 作者:醒不来的梦

从5.0升级到5.1 Laravel后,我有问题的AWS S3。

After upgrading to Laravel 5.1 from 5.0, I'm having problems with AWS S3.

我创建了一个测试的路线,以验证S3是工作,似乎是不:

I created a test route to verify that S3 was working and it seems that is is not:

get('/test', function() {
   return Storage::disk('s3')->exists('temp/file.jpg') ? 'true' : 'false';
});

时,返回以下错误:

S3Exception in WrappedHttpHandler.php line 152:
Error executing "HeadObject" on "https://s3.amazonaws.com/rugapp/temp/file.jpg"; AWS HTTP error: Client error response [url] https://s3.amazonaws.com/app/temp/file.jpg [status code] 403 [reason phrase] Forbidden (client): 403 Forbidden

之后做一些研究,似乎这个问题可能会或可能不会涉及到HHVM。我使用Laravel宅基地运行于以下内容:

After doing some research, it seems this issue may or may not be related to HHVM. I am using Laravel Homestead which runs the following:

的Ubuntu 14.04 在PHP 5.6 HHVM Nginx的

在阅读这,我升级HHVM至3.8,开发和重新启动的Nginx的。这个问题依然存在。

After reading this, I upgraded HHVM to 3.8-dev and restarted Nginx. The problem remained.

有没有人对如何解决这个问题的任何见解?

Does anyone have any insight on how to resolve this problem?

更新:看来现在的工作很好,但我不知道为什么。我没有一夜所做的任何更改。奇怪的。

UPDATE: It seems to work fine now but I'm not sure why. I haven't made any changes overnight. Strange.

推荐答案

类似的问题,在我的本地宅基地发展情况,而我的应用程序上的Linode运行正常工作。

Similar issue happens in my local homestead development while my app running on Linode works fine.

在检查S3许可,签出的旧版本,等等,当我重新启动宅基地这个问题消失了。

After checking S3 permission, checked out old version, etc., this problem disappear when I restart homestead.

homestead halt
homestead up --provision