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!

The article compares ACID and BASE database models, detailing their characteristics and appropriate use cases. ACID prioritizes data integrity and consistency, suitable for financial and e-commerce applications, while BASE focuses on availability and

The article discusses securing PHP file uploads to prevent vulnerabilities like code injection. It focuses on file type validation, secure storage, and error handling to enhance application security.

Article discusses best practices for PHP input validation to enhance security, focusing on techniques like using built-in functions, whitelist approach, and server-side validation.

The article discusses strategies for implementing API rate limiting in PHP, including algorithms like Token Bucket and Leaky Bucket, and using libraries like symfony/rate-limiter. It also covers monitoring, dynamically adjusting rate limits, and hand

The article discusses the benefits of using password_hash and password_verify in PHP for securing passwords. The main argument is that these functions enhance password protection through automatic salt generation, strong hashing algorithms, and secur

The article discusses OWASP Top 10 vulnerabilities in PHP and mitigation strategies. Key issues include injection, broken authentication, and XSS, with recommended tools for monitoring and securing PHP applications.

The article discusses strategies to prevent XSS attacks in PHP, focusing on input sanitization, output encoding, and using security-enhancing libraries and frameworks.

The article discusses the use of interfaces and abstract classes in PHP, focusing on when to use each. Interfaces define a contract without implementation, suitable for unrelated classes and multiple inheritance. Abstract classes provide common funct


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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

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

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Linux new version
SublimeText3 Linux latest version

Dreamweaver CS6
Visual web development tools

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.