Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

daverydan's avatar

Heroku and AWS S3 Image Upload Issue

So, on my local server I can upload images to AWS S3 with no issues. However, when I upload or delete images(sitewide) on my dev and production sites I get the following error:

S3Exception in WrappedHttpHandler.php line 192: Error executing "ListObjects" on "https://s3-us-west-2.amazonaws.com/mdreptrack?prefix=img%2Fsurgeon%2Fuser_2%2Fsurgeon_139202%2F1518620513_brain_vector.png%2F&max-keys=1&encoding-type=url"; AWS HTTP error: count(): Parameter must be an array or an object that implements Countable

Here's a Google I did: https://www.google.com/search?ei=vHuEWv-2CZS0jwO_gJDoDQ&q=AWS+HTTP+error%3A+count%28%29%3A+Parameter+must+be+an+array+or+an+object+that+implements+Countable+Laravel&oq=AWS+HTTP+error%3A+count%28%29%3A+Parameter+must+be+an+array+or+an+object+that+implements+Countable+Laravel&gs_l=psy-ab.3...125388.128491.0.128739.10.9.1.0.0.0.103.809.8j1.9.0....0...1c.1.64.psy-ab..0.0.0....0.SAQ7w2097lc

It seems to me that something is happening with PHP version 7.

I also found this, as I'm hosting on Heroku: https://devcenter.heroku.com/changelog-items/777

I tried to update my composer.json accordingly, but because I'm running PHP v7.1.13 locally I can't run $ composer update. I get the following error:

$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - This package requires php ^5.5.9 but your PHP version (7.1.13) does not satisfy that requirement.

Not sure how to resolve this or if this is even the issue.

I also updated to HTTPS as of today.

Thanks in advance!

0 likes
0 replies

Please or to participate in this conversation.