Hi Appa,
For starters, which version of nginx and PHP are you using? I am using nginx 1.0.4 and PHP 5.3.6.
Next, in the nginx configuration I do:
http {
[...]
# geo directive must be set on the http level
geo $x {
default "${include_path}:/my/other/include/path";
}
[...]
}
then, in a virtual host configuration:
server {
[...]
# php-fpm upstream
location ~ ^(?<SCRIPT_FILENAME>.+\.php)(?<PATH_INFO>[^?]*)$ {
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$SCRIPT_FILENAME;
fastcgi_param PATH_INFO $PATH_INFO;
fastcgi_param PATH_TRANSLATED $document_root$PATH_INFO;
# set site-specific php configuration parameters
fastcgi_param PHP_VALUE $x;
if (-f $document_root$SCRIPT_FILENAME) {
fastcgi_pass phpfarm;
}
}
Then I created a test.php file in the document root with the following contents:
<?
printf("include_path is: \"%s\"\n", get_include_path());
?>
And when calling the script, it outputs: ".:/usr/share/php:/my/other/include/path", so it works for me.
Let's find out why it doesn't work for you?
Andrejs