Hi folks,
Been scratching my head trying to figure this baby out for the past day, but alas, I have resulted - despite numerous searches high and low on this forum for a somewhat similar issue - in creating a topic for it.
Here’s my story.
Trellis, Bedrock, Sage setup
I have a custom plugin that fetches data from an API, and various Blade templates that call said functions and display the data in the template. I have included this plugin with my commits to Bitbucket (specifying that it should include this plugin when pushing to BB) as it is a private plugin.
So here’s the the deal – everything works fine on DigitalOcean - plugin functions well, data is being pulled, rendered , all that good stuff. The DO VPS I am pushing to is configured as production instance in Trellis, fwiw.
I go to configure my staging environment – which seems to go fine. It is a Rackspace server, only accessible via a VPN. The deploy also seems to go fine, my theme is working well, I import the database and we’re looking good.
However, when loading any page that uses my custom plugin, it hangs for 6 seconds or so, and eventually displays the basic WordPress content() but not a trace of my plugin’s API data. From looking at the logs from my site install in srv/www/mysite.com, I’m getting this:
[error] 8109#8109: 784 FastCGI sent in stderr: “PHP message: PHP Warning: usort() expects parameter 1 to be array, null given in /srv/www/—my-path-to-plugin-goes-here.php/ on line 62” while reading response header from upstream, client: 192.168.****, server: ..., request: “GET /category/my-custom-template/ HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php-fpm-wordpress.sock:”, host: “...", referrer: "http://..*.*/”
My question is — is there anything obvious about that error that I’m missing? My php-fpm-wordpress.sock is empty, but it’s almost empty on my working-fine DigitalOcean version.
Is the fact that my server, only accessible via a VPN, causing my API calls to falter?
What obvious reason that might be going over my head, is that such a similar setup would fail on my staging site, but function fine on a DO Droplet?
Any help is much appreciated.