1

I've got problem witch Nginx and php-gettext module. All works without any trouble on apache, but on nginx not. I've got two servers started on my notebook. Apache works on 80 port, and Nginx on 81. When I run my page on apache's port, then all works ok, gettext's translating etc., but when i swtich to nginx (on port 81), then gettext is stoping wokrs.

I already searched for answer, but no one could help me.

I am using SpawnCGI to run php, but tried php-fpm, and same results. I can't imagine that all works on apache but on nginx not ;z.

If you got any idea help me.

1 Answers1

1

Are you running PHP as the mod_php Apache module in your Apache and as a FastCGI on your Nginx? Or are they both configured with the exact same FastCGI backend?

If they are different: run a phpinfo() on both and see if the gettext extension is available or not.

Changes are, your Apache's mod_php module is loading a different php.ini file than your FastCGI version.

Mojah
  • 1,373
  • 2
  • 12
  • 16
  • They are both exact same ; ), I've sloved this problem. The diffrence was that, the nginx for default's using $_SERVER["DOCUMENT_ROOT"] as /usr/local/nginx/html, no matter if you change it in configuration file, and In my script I have used that. I already changed $_SERVER["document_root"] by dirname(__FILE__) and all works great ; ) – Konrad Kwiatkowski Dec 12 '11 at 00:32