Php-fpm profile issu

my php-fpm.conf configuration file is as follows:

clipboard.png
include *conf

php.fpm.dconf

clipboard.png
I set an array variable in m.beike.conf

;DB
env[DB_HOST] = "127.0.0.1"
env[DB_NAME] = "test"
....

you can"t get it through $_ server [DB _ HOST] in the php code. You can access it by setting this set of variables under www.conf. What"s going on?

Mar.18,2021

the nginx configuration file must specify the socket port number.

// php-fpm.d/example.conf
user = nobody
group = nobody
listen = 127.0.0.1:9093 // 9093
....

corresponding nginx configuration:

location ~ \.php$ {
        fastcgi_pass 127.0.0.1:9093; // 9093
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
  • How does nginx+php print the error log of php?

    I modified the error_log path in php.ini. Restart php-fpm to check that phpinfo () is indeed modified successfully. It is true that the browser does not display an error when there is an error in php, but there is no error message in the log file I set ...

    May.07,2021
Menu