ERROR: Unable to globalize & #39;/usr/local/NONE/etc/php-fpm.d/*. conf & #39; problem solving, globalizephp-fpm.d

Source: Internet
Author: User
Tags sapi

ERROR: Unable to globalize '/usr/local/NONE/etc/php-fpm.d/*. conf' troubleshooting, globalizephp-fpm.d

Today, we continue to die, and we are stuck in php7 configuration.

As shown in the preceding example, after various extensions are installed yesterday, decompress the php7 compressed file to/usr/local /.

Then configure the config extension:

./Configure -- prefix =/usr/local/php7 \
-- With-gd \
-- With-freetype-dir \
-- Enable-gd-native-ttf \
-- Enable-mysqlnd \
-- With-pdo-mysql = mysqlnd \
-- With-openssl \
-- With-mcrypt \
-- Enable-mbstring \
-- Enable-zip \
-- Enable-fpm

Here we encountered the first pitfall: Pit 1. It is ensured that all the extension commands are one line to ensure normal installation. However, after the installation is complete, no Makefile exists. Therefore, the make and make install commands cannot be executed. Simply check whether all commands are executed.

./Configure -- enable-fpm

After the fpm is re-installed, the Makefile is ready.

Then make it. Warehouse 2:

 ERROR: Unable to globalize '/usr/local/NONE/etc/php-fpm.d/*.conf' (ret=2) from /usr/local/etc/php-fpm.conf at line 125.

This is good to say, since it is in the/usr/local/etc/php-fpm.conf file problem, go to find, really last line is like this:

Includes = NONE/etc/php-fpm.d/*. conf

Modify it to include = etc/php. fpm. d/*. conf. Otherwise, the configuration extension of this file will not be found (that is, the following pitfall)

This is why I often wonder. See the Internet said to modify/usr/local/etc/php-fpm.conf inside,

; Unix user/group of processes; Note: The user is mandatory. If the group is not set, the default user's group;       will be used.user = www-datagroup = www-data

Well, change it. I found two conf files under the root directory,

But none of the php-fpm.conf files found
; Unix user/group of processes; Note: The user is mandatory. If the group is not set, the default user's group; will be used.
This section. So I began to wonder if this problem was a little tough. So I started to find two other expansion configuration files:

Finally, under php7/sapi/fpm/www. conf,

After modifying the two nobodies to www-data, continue to run/usr/local/bin/php-fpm. 3:

ERROR: [pool www] cannot get uid for user 'www-data'

At this time, my heart collapsed. What about enabling the service ??

Well, what is www. conf? I found the definition on the official website and said:

That's not enough. Simply use nobody to avoid risks. So I was happy to change it back.

Run/usr/local/bin/php-fpm again, and it started normally. Summary:

1. After decompression, put the folder under/usr/local/. If Makefile does not appear after the./configure extension is installed, consider compiling PHP.--enable-fpmConfigure options to activate FPM support, so you need to reinstall it to ensure that the installation is successful:

./Configure -- enable-fpm

 

2. A total of four files need to be modified. First, ensure that the extension configuration file www. conf in the following two php-fpm.conf are the default nobody

/Usr/local/etc/php-fpm.d/www. conf

/Usr/local/php7/sapi/fpm/www. conf

 

3. In the following two files, the last line of include = NONE/etc/php-fpm.d/*. confChange to include = etc/php-

Fpm. d/*. conf

/Usr/local/etc/php-fpm.conf

/Usr/local/php7/sapi/fpm/php-fpm.conf

 

 

4. Because the user and user group in the configuration file have been modified, you need to re-run

./configure --enable-fpm --with-mysqli --with-fpm-user=nobody --with-fpm-group=nobody

 

Finally, paste the referenced official document address:

Http://php.net/manual/zh/install.fpm.install.php

Http://php.net/manual/zh/install.unix.nginx.php

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.