- Forums
- 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. [396], Last Updated: Sat May 18, 2024
unix
Thu Aug 31, 2006
0 Comments
2244 Visits
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.