How To Disable PHP Globally - Linux Unix Shell Command Prompt
how to disable php globally - linux unix shell command prompt
how, to, disable, php, globally, linux, unix, shell, command, prompt
How To Disable PHP Globally - Linux Unix Shell Command Prompt
Post Description: how to disable php globally - linux unix shell command prompt
POST# 192
Posted On: Fri Feb 29, 2008 12:01 pm
unix
Topic: How To Disable PHP Globally - Linux Unix Shell Command Prompt
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.


No Repies
(0) Comments for How To Disable PHP Globally - Linux Unix Shell Command Prompt

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload