585   Apache PHP

1,注释掉module模式执行PHP

#LoadModule php5_module modules/libphp5.so

2,在httpd.conf增加action:

Action application/x-httpd-php /cgi-bin/php-cgi

如果在/cgi-bin/目录找不到php-cgi.可自行从php源码里面cp一个。

[root@v0A-123-177-206 modules]# find / -name php-cgi
/home/weblogic/php-5.6.8/sapi/cgi/php-cgi

3,重启apache,再打开phpinfo()页面发现Server API变成:CGI/FastCGI。说明成功切换为cgi模式。

 

 




Leave a Reply

Your email address will not be published. Required fields are marked *