1

I'm trying to migrate from Apache to nginx. In my Apache conf file I had

php_value include_path "/home/my-app/topincs/php:/home/my-app/topincs/vendor/php" 

Now I got

fastcgi_param PHP_VALUE "include_path=/home/my-app/topincs/php:/home/my-app/topincs/vendor/php"; 

in my nginx's fastcgi_params file, but it seems the include path is not used by php-fm as I'm getting the following error.

PHP message: PHP Warning: require_once(Response.php): failed to open stream: No such file or directory in /home/my-app/topincs/docroot/.start on line 3 

Whereas the file Response.php does exist in the directory /home/my-app/topincs/php.

How should I set it so that php-fpm recognize it?

1 Answer 1

2

You can set php values directly in your fpm-pool configuration file like this:

php_value[include_path] = "/home/my-app/topincs/php:/home/my-app/topincs/vendor/php" 

You don't need to set it in your nginx configuration.

3
  • 1
    Can you set the include_path per directory from here? Commented Jul 15, 2014 at 18:38
  • I built Nginx and php-fpm from source and I can't see any pool.d directory anywhere. Is this pool configuration related to Nginx or to Apache or both ? Why is your configuration not json like ? Commented Oct 26, 2016 at 7:40
  • It doesn't have to be in a pool.d directory, this depends on the distribution. pool configurations are either in php-fpm.conf or included from there. The configuration is related to php, independent from the webserver you're using. Commented Nov 24, 2016 at 7:52

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.