Windows under Apache 1.3 run php_php Tutorial in FastCGI mode

Source: Internet
Author: User
I have been running PHP in ISAPI mode (as the mainstream development language now), the biggest drawback is that the stability is not good, when PHP (as the mainstream development language now) error, Apache (Unix platform The most popular Web server platform) process is also dead. I later saw the introduction of PHP (which is now the mainstream development language) running in Fastcgi (which is now in use) mode, the various benefits (stability, security, high performance) that I decided to try.

But things are far less smooth than expected. Google has not found a number of times how to use the Apache (Unix platform of the most popular Web server platform) + Fastcgi (now not many people in use) to run PHP (as the mainstream development language now), IIS (Microsoft's Web server platform + Fastcgi (now not many people are using) to run PHP (as the current mainstream development language) is quite a lot. One of them mentions that Zend company also recommended to run PHP (as the current mainstream development language) in Fastcgi (now a few people in use) mode (http://php as the current mainstream development language) lens.com/php (as the current mainstream development language) EVERYWHERE/FASTCGI (now not many people are using)-php (as the current mainstream development language).

After a few hours of groping, finally successfully achieved the Apache (Unix platform of the most popular Web server platform) 1.3 + Fastcgi (now no more people in use) run PHP (as the mainstream development language now).

Preparatory work:
First visit http://www.fastcgi (now not many people are using). com/dist/Download the mod_fastcgi for Apache (the most popular Web server platform on UNIX platforms) (now it's not a lot of people). I'm using mod_fastcgi (not many people are using it now) -2.4.2-ap13.dll. After downloading, copy this file to the modules directory of Apache (the most popular Web server platform on UNIX platforms).

Download PHP (as the current mainstream development language) (I use PHP (as the current mainstream development language) -5.0.4), and unzip, as needed, modify PHP (as the current mainstream development language). ini file. Note that you do not need to copy any files from the directory of PHP (which is now the mainstream development language) to the Windows directory.

To modify the configuration:
Then modify the httpd.conf file and add the following lines:

LoadModule fastcgi (now not many people in use) _module modules/mod_fastcgi (now not many people in use) -2.4.2-ap13.dll
SCRIPTALIAS/FCGI (now not many people are using)-php (as the current mainstream development language) 5/"d:/usr/local/php (as the mainstream development language now) -5.0.4/"
FASTCGI (now not many people are using) Server "d:/usr/local/php (as the current mainstream development language) -5.0.4/php (as the current mainstream development language)-cgi (now not many people are using). exe"-processes 3
# Description:-processes 3 here means start three PHP (as the current mainstream development language)-cgi (now not many people are using) the. exe process,
# Please refer to the Fastcgi (now there are not many people in use) document for detailed parameters of Fastcgi (now not many people are using) Server.
AddType application/x-httpd-fastphp (as the current mainstream development language) 5. PHP (as the current mainstream development language)
Action application/x-httpd-fastphp (as the current mainstream development language) 5 "/fcgi (now not many people are using)-php (as the current mainstream development language) 5/php (as the current mainstream development language)-cgi ( Not many people are using it now.. exe "
# Description: Modify the above two boldface characters according to the location of your PHP (as the current mainstream development language) file.

Once the modifications are complete, restart Apache (the most popular Web server platform on the UNIX platform).

Problems:
According to my many experiments, the most likely problems are mainly caused by the path. So first check PHP (as the current mainstream development language). All paths in the. ini and httpd.conf files are correct. The second is if the system has previously installed PHP (as the current mainstream development language), then the c:windowsphp (as the current mainstream development language). INI renamed or deleted.

Second, check whether PHP (as the current mainstream development language) has enough permissions for the directory (I am all set to everyone-full control, anyway the development machine does not have to consider so many security restrictions).

The advantages of Fastcgi (now not many people in use) mode to run PHP (as the current mainstream development language):
There are several major benefits to running PHP in Fastcgi (which is now in use) mode, which is now the mainstream development language. The first is that PHP (which is now the mainstream development language) will not break down Apache (the most popular UNIX platform Web server platform), just PHP (as the current mainstream development language) of its own process (but Fastcgi (now not many people are using) Will immediately restart a new PHP (as the current mainstream development language) process to replace the lost process). Next Fastcgi (now not many people in use) mode to run PHP (as the current mainstream development language) than the ISAPI mode performance better (I was using Apache (Unix platform most popular web server platform) Bench tested, but forgot to save the results, Everyone is interested to test themselves).

Finally, it is possible to run PHP at the same time (as the current mainstream development language) 5 and PHP (as the current mainstream development language) 4. Refer to the following configuration file, set up two virtual hosts, one using PHP (as the current mainstream development language) 5, the other using PHP (as the current mainstream development language) 4.

LoadModule fastcgi (now not many people in use) _module modules/mod_fastcgi (now not many people in use) -2.4.2-ap13.dll

SCRIPTALIAS/FCGI (now not many people are using)-php (as the current mainstream development language) 5/"d:/usr/local/php (as the mainstream development language now) -5.0.4/"
FASTCGI (now not many people are using) Server "d:/usr/local/php (as the current mainstream development language) -5.0.4/php (as the current mainstream development language)-cgi (now not many people are using). exe"-processes 3
SCRIPTALIAS/FCGI (now not many people are using)-php (as the current mainstream development language) 4/"d:/usr/local/php (as the mainstream development language now) -4.3.11/"
FASTCGI (now not many people are using) Server "d:/usr/local/php (as the current mainstream development language) -4.3.11/php (as the current mainstream development language). exe"

Listen 80
Namevirtualhost *:80

DocumentRoot d:/www
Options Indexes followsymlinks MultiViews
ServerName PHP (as the current mainstream development language) 5.localhost

AddType application/x-httpd-fastphp (as the current mainstream development language) 5. PHP (as the current mainstream development language)
Action application/x-httpd-fastphp (as the current mainstream development language) 5 "/fcgi (now not many people are using)-php (as the current mainstream development language) 5/php (as the current mainstream development language)-cgi ( Not many people are using it now.. exe "


Indexoptions fancyindexing Foldersfirst
Options Indexes followsymlinks MultiViews
AllowOverride None
Order Allow,deny
Allow from all

Listen 8080
Namevirtualhost *:8080


DocumentRoot d:/www
Options Indexes followsymlinks MultiViews
ServerName PHP

http://www.bkjia.com/PHPjc/508537.html www.bkjia.com true http://www.bkjia.com/PHPjc/508537.html techarticle I have always been running in ISAPI mode PHP (as the mainstream development language now), this way the biggest drawback is the stability is not good, when PHP (as the mainstream development of the current language ...)

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.