- Linux Hosting
- How To Disable PHP Globally - Linux Unix Shell Command Prompt
This Page Contains information about How To Disable PHP Globally - Linux Unix Shell Command Prompt By unix in category Linux Hosting with 0 Replies. , Last Updated: Tue Feb 07, 2023
Thu Aug 31, 2006
To disable PHP globally, Just edit: your php.conf file by commenting out the following : AddHandler
. Enter this command to edit:
if you prefer to use the VI editor then enter this command:
The php.conf file will look like this:
# 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
# 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
Now restart your apache server by sending this command:
NOTE: i was using Redhat/Fedora for this.