Web Servers on Unix and Linux - Turn off PHP completely

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > October 2004 > Turn off PHP completely





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Turn off PHP completely
Shabam

2004-10-15, 9:09 pm

I just installed Fedora 2 running Apache 2. I'd like to completely shut of
PHP on the server. However there's nothing in the httpd.conf file regarding
it, so I'm unable to. I'm not looking to just shut it off for one virtual
host. I want it off completely.

How do I do this?



Chris Morris

2004-10-15, 9:09 pm

"Shabam" <blislecp@hotmail.com> writes:
> I just installed Fedora 2 running Apache 2. I'd like to completely shut of
> php on the server. However there's nothing in the httpd.conf file regarding
> it, so I'm unable to. I'm not looking to just shut it off for one virtual
> host. I want it off completely.


If there's nothing at all in the httpd.conf file (don't forget to
check files included by it) then I'm surprised if php works - either
there'll be a line to add the PHP4 apache module, or there'll be a
line to associate .php with the php CGI binary.

If you can't find that, other options:

Look for /usr/bin/php4 or /usr/bin/php or /usr/lib/cgi-bin/php or
wherever Fedora puts it (sorry, not familiar with Fedora), find out what
package it's from, and uninstall that package. If that package happens
to be Apache 2, you have a few options.
1) Disable CGI in general. Might be overkill.
2) Chmod 000 the php binary.
3) Change to a distribution that has Apache and php as separate packages.
4) Remove the package and then compile Apache2 from the original sources.

--
Chris
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com