Tuesday, August 21, 2018

On NGINX PHP fastcgi skips right over memcache.ini and mongo.ini files

I have a strange issue I can’t seem to figure and googled and researched a lot to no end.



I’ve got php-fastcgi via spawn-fcgi running fine on nginx (cent os 5). However, I’m trying to load memcache and mongo php extensions and for some reason nginx skips right over their ini files in /etc/php.d/. I know memcache and mongo extensions are installed correctly because my apache instance on the same box loads them fine. I’m thinking maybe I need to build php from source and specifically include them in the ./configure .. just a bit gun shy to do this because I’m not sure how this will impact the installation since I installed everything from yum.




Finally, all permissions check out and I've even tried putting the extensions directly into /etc/php.ini without success and the issue persists.



Just wanted to also add that simply restarting the nginx service to load the modules (as is required) wasn't enough.



Here is what phpinfo() on NGINX shows:



Configuration File (php.ini) Path: /etc/php.ini



Scan this dir for additional .ini files: /etc/php.d




additional .ini files parsed: /etc/php.d/dbase.ini, /etc/php.d/dom.ini, /etc/php.d/gd.ini, /etc/php.d/imap.ini, /etc/php.d/json.ini, /etc/php.d/mbstring.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/xmlreader.ini, /etc/php.d/xmlwriter.ini, /etc/php.d/xsl.ini



Here is what phpinfo() on Apache shows:



Configuration File (php.ini) Path: /etc/php.ini



Scan this dir for additional .ini files: /etc/php.d



additional .ini files parsed: /etc/php.d/dbase.ini, /etc/php.d/dom.ini, /etc/php.d/gd.ini, /etc/php.d/imap.ini, /etc/php.d/json.ini, /etc/php.d/mbstring.ini, /etc/php.d/memcache.ini, /etc/php.d/mongo.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/xmlreader.ini, /etc/php.d/xmlwriter.ini, /etc/php.d/xsl.ini




..notice apache loaded memcache.ini and mongo.ini and nginx didn't. What could be wrong?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...