Table of Contents
回复讨论(解决方案)
Home Backend Development PHP Tutorial nginx+php-fpm部分网页显示空白

nginx+php-fpm部分网页显示空白

Jun 23, 2016 pm 01:55 PM
show blank Web page

nginx + php-FPM-FCGI,有些网站的有些页面显示空白(注:不是所有动态页都不能显示)是怎么回事呢?
比如zencart旧版兰亭模板后台正常(进后台把默认开启的伪静态关闭了,但),前台全是空白,新版兰亭前后台都是空白,而对应的官方zencart一切正常,淘客帝国的淘客程序首页空白其它页面正常。
查到了nginx、php的错误日志,没有产生错误日志记录。
网上查到的:nginx的配置文件里面缺
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
我看了我的是有的。

我是在debian下安装最新版directadmin面板时选择了新增的nginx自定义安装,并且装了两个版本的php,5.3和5.5,无论是用哪个版本的php都有这个问题
至于上面提到的程序之前在apache php5.3、5.4的环境下运行良好。
谢谢!


回复讨论(解决方案)

不是所有动态页都不能显示
表示环境配置基本没有问题,但不能排除不能显示的页中使用了过期函数而引起的错误

谢谢!
我之前也怀疑是不是php版本过高,网页中使用了废弃的函数导致,于是我切换成php5.3再测试仍然一样,但zencart旧版兰亭模板之前在apache php5.3环境下能正常显示的(原本不支持php5.3,报错,通过修改相关函数等已经可以正常显示了),且新版兰亭是基于zencart1.51做的,zencart1.51是支持php5.3的,照理做模板的不会还按旧版兰亭一样,做成只支持php5.2了吧!
难道是同时安装两个都使用FPM-FCGI的php本来就是会冲突的?(因为之前查网上资料,装两个版本php大都是通过不同端口、不同的运行方式来做到同时运行两个版本php)

你同时运行了两个不同版本的 php?
出现冲突是很正常的,因为他们使用了同名的动态链接库,而不同版本的动态链接库间是略有差异的

既然仍有部分 php 页面可以正常运行,就应该不是这个问题

是directadmin面板的安装脚本安装的,我只是选择了安装两个php,一个5.3,一个5.5,安装后我看了php的目录,分别是php53 php55,FPM的配置文件也是有两个的,动态链接库应该也是分别放置的,某个网站使用哪个版本的php是在该用户下的nginx.conf里配置切换的。
照这么说我这问题是使用了废弃的函数的可能性最大?那就纳闷了,明明在apache下可以运行,至于相关的支持组件,在安装zencart时会自动检测,都是支持的!
难不成最新版的nginx会自动识别htaceess了,由于里面的规则不适合nginx所以导致页面不显示,但我把根目录下的htaccess删了还是一样。
感觉nginx伪静态这块,一方面有些应用没有给出对应的规则,转换也不一定完全正确,并且还得有操作nginx重启或重新加载配置文件的权限,所以似乎nginx不适合用来开空间给别人用,是这样吗?
哎,搞不定就还是装apache算了!

是不是要用于卖空间还是用apache 更合适呢?

这样的猜测下去,没有什么意义了

Statement of this Website
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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to send web pages to desktop as shortcut in Edge browser? How to send web pages to desktop as shortcut in Edge browser? Mar 14, 2024 pm 05:22 PM

How to send web pages to the desktop as a shortcut in Edge browser? Many of our users want to display frequently used web pages on the desktop as shortcuts for the convenience of directly opening access pages, but they don’t know how to do it. In response to this problem, the editor of this issue will share the solution with the majority of users. , let’s take a look at the content shared in today’s software tutorial. The shortcut method of sending web pages to the desktop in Edge browser: 1. Open the software and click the "..." button on the page. 2. Select "Install this site as an application" in "Application" from the drop-down menu option. 3. Finally, click it in the pop-up window

How to set up web page automatic refresh How to set up web page automatic refresh Oct 26, 2023 am 10:52 AM

To set the automatic refresh of a web page, you can use the HTML "meta" tag, the JavaScript "setTimeout" function, the "setInterval" function or the HTTP "Refresh" header. Detailed introduction: 1. Use the "meta" tag of HTML. In the "<head>" tag of the HTML document, you can use the "meta" tag to set the automatic refresh of the web page; 2. The "setTimeout" function of JavaScript, etc.

What should I do if the images on the webpage cannot be loaded? 6 solutions What should I do if the images on the webpage cannot be loaded? 6 solutions Mar 15, 2024 am 10:30 AM

Some netizens found that when they opened the browser web page, the pictures on the web page could not be loaded for a long time. What happened? I checked that the network is normal, so where is the problem? The editor below will introduce to you six solutions to the problem that web page images cannot be loaded. Web page images cannot be loaded: 1. Internet speed problem The web page cannot display images. It may be because the computer's Internet speed is relatively slow and there are more softwares opened on the computer. And the images we access are relatively large, which may be due to loading timeout. As a result, the picture cannot be displayed. You can turn off the software that consumes more network speed. You can go to the task manager to check. 2. Too many visitors. If the webpage cannot display pictures, it may be because the webpages we visited were visited at the same time.

Possible reasons why the network connection is normal but the browser cannot access the web page Possible reasons why the network connection is normal but the browser cannot access the web page Feb 19, 2024 pm 03:45 PM

The browser cannot open the web page but the network is normal. There are many possible reasons. When this problem occurs, we need to investigate step by step to determine the specific cause and solve the problem. First, determine whether the webpage cannot be opened is limited to a specific browser or whether all browsers cannot open the webpage. If only one browser cannot open the web page, you can try to use other browsers, such as Google Chrome, Firefox, etc., for testing. If other browsers are able to open the page correctly, the problem is most likely with that specific browser, possibly

How to deal with blanks when playing PPT slides How to deal with blanks when playing PPT slides Mar 26, 2024 pm 07:51 PM

1. Open the PPT file you created and select the second slide. 2. On the second slide, select one of the pictures, and then select [Animation] to add any animation effect. 3. In the start column of the animation bar, change [While Standalone] to [After Previous Animation], and you will see that the picture animation label [1] will change to [0]. Do the same for subsequent slides, and you can see the effect by playing the slide at the end.

What to do if the webpage cannot be opened What to do if the webpage cannot be opened Feb 21, 2024 am 10:24 AM

How to solve the problem of web pages not opening With the rapid development of the Internet, people increasingly rely on the Internet to obtain information, communicate and entertain. However, sometimes we encounter the problem that the web page cannot be opened, which brings us a lot of trouble. This article will introduce you to some common methods to help solve the problem of web pages not opening. First, we need to determine why the web page cannot be opened. Possible reasons include network problems, server problems, browser settings problems, etc. Here are some solutions: Check network connection: First, we need

Reasons and solutions for desktop layout being locked Reasons and solutions for desktop layout being locked Feb 19, 2024 pm 06:08 PM

What happens when the desktop layout is locked? When using the computer, sometimes we may encounter the situation where the desktop layout is locked. This problem means that we cannot freely adjust the position of desktop icons or change the desktop background. So, what exactly is going on when it says that the desktop layout is locked? 1. Understand the desktop layout and locking functions. First, we need to understand the two concepts of desktop layout and desktop locking. Desktop layout refers to the arrangement of various elements on the desktop, including shortcuts, folders, widgets, etc. we can be free

How to open php on the web page How to open php on the web page Mar 22, 2024 pm 03:20 PM

Executing PHP code in a web page requires ensuring that the web server supports PHP and is properly configured. PHP can be opened in three ways: * **Server environment:** Place the PHP file in the server root directory and access it through the browser. * **Integrated Development Environment: **Place PHP files in the specified web root directory and access them through the browser. * **Remote Server:** Access PHP files hosted on a remote server via the URL address provided by the server.

See all articles