Solution to PHP 9000 port not starting: 1. Find "php5/fpm/pool.d/www.conf"; 2. Change listen to "127.0.0.1:9000"; 3. Change nginx Change back to the port listening method; 4. Restart nginx and php-fpm.
The operating environment of this article: ubuntu 16.04 system, PHP7.1 version, DELL G3 computer
What should I do if the php 9000 port is not started? ?After php-fpm is started, port 9000 does not appear?
Recently reproduced a php extension For the backdoor, you need to build an Nginx php environment. I installed nginx naked from source code without any third-party modules.
php-cli and php-fpm are installed through Ubuntu’s standard apt-get command.
Then you need to modify the nginx.conf file of nginx to support php script parsing.
After checking, there are two configurations on the Internet, one is
supports 127.0.0.1:9000
location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/$fastcgi_script_name; include fastcgi_params; }
and the other is to use sock files
location ~ .php$ { root /usr/share/nginx/html; fastcgi_pass unix:/var/run/php-fpm/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
At the beginning, I used the first 9000 port configuration method, but PHP could not parse it. After checking the php-fpm log, I found that there was a sock
[17-Sep-2019 00:23:02] NOTICE: fpm is running, pid 5617 [17-Sep-2019 00:23:02] NOTICE: ready to handle connections [17-Sep-2019 00:23:02] NOTICE: systemd monitor interval set to 10000ms [17-Sep-2019 00:31:28] ERROR: An another FPM instance seems to already listen on /var/run/php5-fpm.sock [17-Sep-2019 00:31:28] ERROR: FPM initialization failed [17-Sep-2019 00:37:34] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful
Then I switched to the second sock file interaction in the nginx configuration file. mode, it was found that the page still could not be parsed.
Finally found the /etc/php5/fpm/pool.d/www.conf configuration file and changed listen to 127.0.0.1:9000
Then changed nginx back to port listening. , after restarting nginx and php-fpm, you can finally parse the php script. .
root@ubuntu:/usr/local/nginx# netstat -tln Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp6 0 0 ::1:631 :::* LISTEN root@ubuntu:/usr/local/nginx# pgrep nginx|xargs kill -s 9 root@ubuntu:/usr/local/nginx# vim conf/nginx.conf root@ubuntu:/usr/local/nginx# sbin/nginx root@ubuntu:/usr/local/nginx#
nginx.conf configuration file
server { listen 80; server_name localhost; root html; index index.php; location ~\.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
/etc/php5/fpm/pool.d/www.conf file modification place:
; The address on which to accept FastCGI requests. ; Valid syntaxes are: ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on ; a specific port; ; 'port' - to listen on a TCP socket to all addresses on a ; specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. listen = 127.0.0.1:9000
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What should I do if the php 9000 port is not started?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

WebStorm Mac version
Useful JavaScript development tools
