Solution: First confirm that php-fpm has been started and the service port is normal; then modify the "*.conf" file under "/usr/local/tengine/conf/vhost"; finally php-fpm.conf In the file, set "listen=127.0.0.1:9000".
Recommendation: "PHP Video Tutorial"
Debugging the lnmp environment today, the following appears Report an error. Unable to query php information.
Environment: Linux version CentOS Linux release 7.3.1611 (Core), nginx uses tengine. Both php and tengine are installed from source code to /usr/local.
First confirm that tengine has been started, and write a static test web page in the root directory of the website. The test is OK and can be displayed normally.
Confirm that php-fpm has been started and the query service port is normal. I suspect that tengine's PHP support is not configured. Open the *.conf host configuration under /usr/local/tengine/conf/vhost and modify the following configuration: add index.php to make the nginx server support index.php as the homepage by default, and enable related configurations through comments.
Note that the location of $document_root can be written as $document_root or the root directory of the website, but it must not be the default /scripts.
location / { root /var/www/html; index index.html index.htm index.php; } ... ... location ~ \.php$ { root /var/www/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } ... ...
At the same time, ensure the configuration of /usr/local/php/etc/php-fpm.conf:
listen = 127.0.0.1:9000
Then, just restart the service.
Related recommendations: php training
The above is the detailed content of What should I do if phpphpinfo cannot be accessed?. 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

Dreamweaver Mac version
Visual web development tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 English version
Recommended: Win version, supports code prompts!

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