search
HomeBackend DevelopmentPHP ProblemWhat should I do if phpphpinfo cannot be accessed?

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".

What should I do if phpphpinfo cannot be accessed?

Recommendation: "PHP Video Tutorial"

Debugging the lnmp environment today, the following appears Report an error. Unable to query php information.

What should I do if phpphpinfo cannot be accessed?

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.

What should I do if phpphpinfo cannot be accessed?

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!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SecLists

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

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

SublimeText3 English version

Recommended: Win version, supports code prompts!

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft