Nginx 502 errors, php problems, wordpress, oh my!Aug 10th, 2010 | By admin | Category: Uncategorized
Well today is a glorious day as I finally managed to fix a problem that had been haunting my server for a month or so. In the end it was a solution that I’ve been taught countless times as something I should be doing by default when upgrading php but alas my mind is not on of the more expensive models and so it rarely does what it should..
So it all started with a fairly minor issue I noticed in WordPress. When I would try to load up the media gallery I would be greeted with a nice 502 Nginx error. I’m sure if I wasn’t running nginx then it would have a blank white page or an apache error. So naturally I started with the nginx error logs which didn’t lead to much.. Then I setup php to log all errors and again that didn’t lead me to much, finally however I monitored my httpd-error.log and this lovely message turned up:
[warn] (2)No such file or directory: Cannot reinit SSLMutex
/libexec/ld-elf.so.1: /usr/local/lib/php/20060613/gd.so: Undefined symbol “zend_parse_parameters_none”
After some asking around on irc I was told that it was definitely a php problem. Nothing more specific than that, just a php problem. There were a bunch of forum posts saying it might have something to do with fastCGI but all the suggestions had no effect. However there was one forum I foudn that through a suggestion out there that lit up a light bulb in my brain. That being that if php5-extensions isn’t recompiled and reinstalled when php is updated sometimes the fit hits the shan. Sure enough I had upgrade php5 a while back, and then again since then but hadn’t bothered to recompile the extensions. Hell I hadn’t even recompiled Zend or Eaccelerator which is pretty standard.
So long story slightly shorter, I went in deinstalled and cleaned up my php5-extensions, reinstalled it and viola, problem solved!!