Forum
Cloud Storage Asset Upload Error
Hello,
I have set up Rackspace Cloud Files / CDN, but when trying to upload an image nothing happens no error in debug.
But closer look into PHP error logs shows this error is triggering when trying to upload an image:
[16-Mar-2017 16:47:18 Europe/London] PHP Fatal error: Cannot use lexical variable $eventName as a parameter name in /path-to-site/admin/addons/apps/perch_openstack/lib/guzzlehttp/guzzle/src/Event/Emitter.php on line 49
Any advice?
Seems to be an error with a version of Guzzle on PHP 7.1
https://github.com/guzzle/guzzle/pull/1393
Confirmed thats the issue, dropping down to PHP 5.6 fixed the issue.
Could we get a fix for this?
I can certainly look into it.
We can't update to the current version of the library, as they've bumped their minimum dependancy to PHP 7.0 and ours is 5.4.
I've applied the patch you've linked to. Can you confirm that resolves the problem for you?
Hi Drew,
I can confirm that patch fixed the error
https://github.com/guzzle/guzzle/pull/1393/commits/fcae91ff31de41e312fe113ec3acbcda31b2622e
Great, thanks. That'll be in Runway 3.
Looks like we'll be bumping the minimum requirements for cloud storage to 7.0 before long.
Perfect thanks Drew,
I'll leave this patch in on my copy until 3 is available
Got it all working locally, but for some reason when I've pushed it up live I'm getting errors uploading images.
Says the container does not exist, although it does. Works perfectly locally
Sure you've not missed deploying a config file?
I'm fairly sure, it's deployed with git
What's the difference between local and live?
Nothing obvious that I can think of, these are both running PHP 5.6, both been set up the same and not had these sort of problems for the 3 years it's been running Perch!
You've checked your
runway.php
andbuckets.php
files?Yes both are correct, and exactly the same as local
Ok. What else can you tell me?
Fixed it, character was uppercase -.-
Cheers Drew
Is there a way to move assets from multiple buckets into one (Cloud Files).
I don't mind manually moving the files, or writing the update script if it's possible to point me in the right direction to what needs updating?
There's no way to move assets between buckets at the moment.