Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-06-2006, 03:40 PM   #1
Harry Seldon
Registered: Feb 2004
Distribution: SLES 9
Posts: 112

Rep: Reputation: 15
Disable PHP?

Is there a way to disable PHP without actually uninstalling it? I'm trying to work with a security audit team and I've got some alerts on PHP installs. I can probably just uninstall it but we need to make sure it isn't needed before we do. The three servers I have with this problem are all really old (RH7.2 and 6.1) so I'm not sure I can find the old packages to reinstall if I have to. Any suggestions, or am I stuck with removing the packages?
Old 04-06-2006, 04:35 PM   #2
Harry Seldon
Registered: Feb 2004
Distribution: SLES 9
Posts: 112

Original Poster
Rep: Reputation: 15
Nevermind. I found a setting in the /etc/php.ini file that allowed me to not advertise the fact that php is installed. It also had a bunch of settings that, when commented out, disassociate php with other applications.
Old 04-06-2006, 04:37 PM   #3
Registered: Mar 2006
Location: Fond du Lac, Wisconsin, USA
Distribution: Debian
Posts: 51

Rep: Reputation: 15
You could comment the LoadModule line in your httpd.conf file. Just find this line in /etc/httpd.conf (or wherever your Apache config file is):

LoadModule php4_module     /usr/lib/apache2-prefork/
(or whatever your LoadModule line is for PHP) and add a '#' symbol to the beginning of the line to comment it out.



php, disable

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Are PHP session variables held in memory when you leave a PHP site? Locura Programming 11 11-16-2008 08:37 PM
Turn off (disable) PHP for some virtual hosts in Apache DaveVT5 Linux - Networking 2 03-02-2006 03:51 PM
what are the services i can disable, also disable ads, banners in konqueror? greythorne SUSE / openSUSE 3 03-16-2005 08:30 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM
Updating php 4.3.1 from tar and keeping current php configuration with mandrake 9.1 mrjeep Linux - General 0 04-02-2003 07:50 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:19 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration