How To Disable PHP Globally - Linux Unix Shell Command Prompt

RegisterLogin
How To Disable PHP Globally - Linux Unix Shell Command Prompt
Post Description: How To Disable PHP Globally - Linux Unix Shell Command Prompt
Tags: How, To, Disable, PHP, Globally, -, Linux, Unix, Shell, Command, Prompt
This Post Was Posted On Feb 29, 2008 By unix #802
To disable PHP globally, Just edit: your php.conf file by commenting out the following : AddHandler and AddType. Enter this command to edit:


     Code:
nano /etc/httpd/conf.d/php.conf

if you prefer to use the VI editor then enter this command:

     Code:
vi /etc/httpd/conf.d/php.conf


The php.conf file will look like this:
     Quote:
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php5_module modules/libphp5.so

#
# Cause the PHP interpreter to handle files with a .php extension.
#
#AddHandler php5-script .php
#AddType text/html .php

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps


I basically put a # infront of AddHandler php5-script .php and AddType text/html .php lines.

Now restart your apache server by sending this command:

     Code:
/etc/init.d/httpd restart


NOTE: i was using Redhat/Fedora for this.
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
©2011 Webune Forums - Tue Dec 20, 2011 6:11 am
Powered by: Webune Forums V3