Friday, January 9, 2015

How to integrate apache with php

hi friends
give me a step how to integrate apache with php.
--
You received this message because you are subscribed to the Google Groups "Sadhiq Linux Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sadhiq-linux-group+unsubscribe@googlegroups.com.
To post to this group, send email to sadhiq-linux-group@googlegroups.com.
Visit this group at http://groups.google.com/group/sadhiq-linux-group.
For more options, visit https://groups.google.com/d/optout.
Reply | Reply to all | Forward | Print | Delete | Show original

Add star 

pranit palande

<palandepranit@gmail.com>
Sat, Jan 3, 2015 at 1:04 PM
Reply-To: sadhiq-linux-group@googlegroups.com
To: "sadhiq-linux-group@googlegroups.com" <sadhiq-linux-group@googlegroups.com>, pranitonline@gmail.com

HI Pranit,

Follow below steps 

Integrating PHP with Apache
There are two ways of integrating PHP with Apache:
  1. Server API mode or in-module
    In this mode, the php parser is loaded along with Apache, when Apache starts. This is the prefered mode for performance. In case the integration of this fails, you can always go for CGI mode.
  2. CGI mode
    In CGI mode, php.exe is called everytime a php file has to be executed by Apache. This is slow method of integrating. But is used in certain cases where other modes have failed or in certain highly secure situations.
Following steps are common to both type of integration. Edit the apache's configuration file httpd.conf and add the following lines, near the AddTypeblock:
AddType application/x-httpd-php-source .phps AddType application/x-httpd-php .php3 .php .phtml
Now, we also want the php files to also be open as default documents in directories, find and modify the DirectoryIndex entry to
DirectoryIndex index.phtml index.php index.php3 index.html index.htm
you can change the order to your preference.
Following steps are specific to each integration:
  1. Server API mode or in-module
    1. Edit the apache's configuration file httpd.conf, and add the following line, near the LoadModule block.
      LoadModule php4_module "c:/PHP/sapi/php4apache.dll"

      If you have installed Apache version 2.0.xx, then add the following line instead
      LoadModule php4_module "c:/PHP/sapi/php4apache2.dll"
    2. Move the php4ts.dll and php4ts.lib files from the c:\PHP to the WINDOWS\System or WINDOWS\System32 directory.
    3. Copy the php.ini file from the c:\PHP to WINDOWS directory.
  2. CGI mode
    Edit the apache's configuration file httpd.conf, and add the following line, near the LoadModule block.
    ScriptAlias /php/ "c:/PHP/" Action application/x-httpd-php "/php/php.exe"

No comments:

Post a Comment