I have developing a PHP application that made calls to the Google API using the OAuth process to authorize the app and retrieve an Access Token and a Refresh Token.
This morning, after a few relatively minor code changes, the wheels fell off the entire application. Baffled, I slowly rolled back my changes to the original point and yet the problem persisted – I logged in to the Google Developers Console to check I hadn’t gone over my quotas and that my app was still there and all was well.
I checked my database as OK, then started writing various echoes in my PHP code to show me the contents of variables and arrays for debugging purposes.
I scratched my head.
I scratched my chin.
Luckily for me, as it’s my companies own server, despite it being a shared (Plesk) hosting account I have full remote access. I logged in to the server to start looking for problems but couldn’t see any. The only odd thing I noticed was that some server related connectivity calls were being a bit temperamental too.
In the end I did what any self-respecting I.T. guy should have done first: I turned it off and on again – problem solved!
I’m posting this purely to remind myself and other PHP developers that sometimes you need to listen to that voice that tells you your code is OK and look elsewhere!