问题描述:

I everyone,

I have PHP running as an Apache module (SAPI Apache 2.0 Handler) on my OS X machine with MAMP and configured it to run as FastCGI script. In my Apache's httpd.conf I only added the following:

<IfModule mod_fastcgi.c>

AddHandler php5.fcgi .php

Action php5.fcgi /php5.fcgi

Alias /php5.fcgi /Applications/MAMP/fcgi-bin/php5.fcgi

FastCgiServer /Applications/MAMP/fcgi-bin/php5.fcgi -socket /Applications/MAMP/tmp/php-fcgi/php5-fpm.sock -pass-header Authorization -idle-timeout 3600

<Directory /Applications/MAMP/fcgi-bin>

Order allow,deny

Allow from all

</Directory>

</IfModule>

And it works (I see SAPI CGI/FastCGI with <?php phpinfo(); ?>).

As I have installed all the stack through MAMP, I was wondering if I should somehow disable the Apache 2.0 Handler module in my httpd.conf (I don't want Apache to run PHP as FastCGI and still have the PHP interpreter within the Apache process itself (which is what the Apache 2.0 Handler PHP module does)).

Should I just comment the following line in httpd.conf and it will be enough?:

LoadModule php5_module /Applications/MAMP/bin/php/php5.6.2/modules/libphp5.so

相关阅读:
Top