Home Backend Development PHP Tutorial php fastcgi有关问题,死锁,超时

php fastcgi有关问题,死锁,超时

Jun 13, 2016 am 11:11 AM
nbsp php test url

php fastcgi问题,死锁,超时
我的服务器环境是nginx,采用fast-cgi方式来解析php。
$open_url = 'http://127.0.0.1:82/test.php';

$img_save_url = file_get_contents($open_url);
如果是test.html是可以正常得到值的,本机的aspx页面也可以获取结果。但php则报 504 gateway timeout错误
请问 这个问题是什么原因导致的?是不是cgi死锁了?
启动采用的方式是:RunHiddenConsole.exe c:\php\php-cgi.exe -b 127.0.0.1:9000 -c c:\php\php.ini


------解决方案--------------------
nginx,php-cgi模式,为啥不用linux而要在windows下蛋疼呢……
------解决方案--------------------
就算是本地可以用虚拟机啊
------解决方案--------------------
$img_save_url = file_get_contents($open_url);
需要 allow_url_fopen = On
不知你设置了没有
------解决方案--------------------
默认 llow_url_fopen = Off

你总不至于
test.php
$open_url = 'http://127.0.0.1:82/test.php';
Copy after login
吧?
------解决方案--------------------
test.html能直接运行php语句么

求扫盲
------解决方案--------------------
贴出你的nginx.ini配置文件 还有你的命令里面运行fastcgi命令
------解决方案--------------------
引用:
引用:test.html能直接运行php语句么

求扫盲
你看懂没有?
我的意思是
$open_url = 'http://127.0.0.1:82/test.html';
$img_save_url = file_get_contents($open_url);
$img_save_url是能获取返回值的,说明是能调到网站……




不好意思

理解错误

你可以在命令下启动service nginx start

或者查看nginx错误日志

一般这种明显的错误都应该可以看得到
------解决方案--------------------
引用:
问题解决了,采用两个php-cgi.exe进程,一个端口是9000,一个端口是9001,就不会出现死锁问题了。两个子网站分别使用不同的处理:
fastcgi_pass   127.0.0.1:9000;
fastcgi_pass   127.0.0.1:9001;
问题原因应该是进程内死锁导致的。
那你运行的需要在nginx.conf文件配置多个项目吗?
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 Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

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)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

Huawei Watch GT 5 smartwatch gets update with new features Huawei Watch GT 5 smartwatch gets update with new features Oct 03, 2024 am 06:25 AM

Huawei is rolling out software version 5.0.0.100(C00M01) for the Watch GT 5 and the Watch GT 5 Prosmartwatchesglobally. These two smartwatches recently launched in Europe, with the standard model arriving as the company’s cheapest model. This Harmony

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

PHP Program to Count Vowels in a String PHP Program to Count Vowels in a String Feb 07, 2025 pm 12:12 PM

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

New Xiaomi Mijia Graphene Oil Heater with HyperOS arrives New Xiaomi Mijia Graphene Oil Heater with HyperOS arrives Oct 02, 2024 pm 09:02 PM

Xiaomi will shortly launch the Mijia Graphene Oil Heater in China. The company recently ran a successful crowdfunding campaign for the smart home product, hosted on its Youpin platform. According to the page, the device has already started to ship to

Top 10 PHP CMS Platforms For Developers in 2024 Top 10 PHP CMS Platforms For Developers in 2024 Dec 05, 2024 am 10:29 AM

CMS stands for Content Management System. It is a software application or platform that enables users to create, manage, and modify digital content without requiring advanced technical knowledge. CMS allows users to easily create and organize content

7 PHP Functions I Regret I Didn't Know Before 7 PHP Functions I Regret I Didn't Know Before Nov 13, 2024 am 09:42 AM

If you are an experienced PHP developer, you might have the feeling that you’ve been there and done that already.You have developed a significant number of applications, debugged millions of lines of code, and tweaked a bunch of scripts to achieve op

See all articles