Tuesday, January 17, 2012

Configuring php handler as Apache module

Sponsored Links

Edit the apache configuration file as follows
vi /etc/httpd/conf/httpd.conf

####   PHP as Apache Module
LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so
AddType application/x-httpd-php .php

Restart the apache
/etc/init.d/httpd restart

How to check:

create an info.php file
vi info.php
<?php
phpinfo();
?>

http://domain.com/info.php

Check the Server API field
If  php is handled by Apache module it will show as
Server API  :  Apache 2.0 Handler

If  php is handled by FastCGI it will show as
Server API  : CGI/FastCGI
Sponsored Links

No comments:

Post a Comment

Be nice. That's all.