Results 1 to 8 of 8
-
10-02-2007, 07:43 PM #1Junior Guru Wannabe
- Join Date
- Aug 2007
- Posts
- 65
disable_functions feature in .htaccess?
I was wondering if anyone knew how to disable phpMail() (SendMail), fsockopen(), and things such as that with htaccess? Sorry If I posted this in the wrong place but I have searched google and found nothing. Also how can I maybe force ads with htaccess? And is there a way to also re-enable those features in a certain directory(s)? Thank you.
-
10-02-2007, 09:39 PM #2Web Hosting Master
- Join Date
- Feb 2003
- Location
- AR
- Posts
- 2,382
If you're looking to make these changes system-wide, you're going to need access to httpd.conf
If you are hosting users and want to edit their .htaccess to make these changes...that's just a bad idea because they can go right in and undo the changes that you've made to the file.
Kevin
-
10-02-2007, 10:03 PM #3Junior Guru Wannabe
- Join Date
- Aug 2007
- Posts
- 65
-
10-02-2007, 10:13 PM #4Web Hosting Master
- Join Date
- Feb 2003
- Location
- AR
- Posts
- 2,382
Not sure what I was thinking when I wrote that previous post...it's been a long day...
If you're in a shared environment, and don't have root access to the server, you will have an extremely difficult (if not impossible) time disabling these features...
-
10-02-2007, 10:49 PM #5Junior Guru Wannabe
- Join Date
- Aug 2007
- Posts
- 65
Dang, oh well. Thanks anyways
-
10-02-2007, 10:50 PM #6Web Hosting Master
- Join Date
- Mar 2004
- Location
- USA
- Posts
- 4,345
-
10-18-2007, 07:45 AM #7Disabled
- Join Date
- Aug 2007
- Posts
- 292
Make empty php.ini file, place the following in it:
disable_functions = proc_open , popen, disk_free_space, diskfreespace, set_time_limit, leak, tmpfile, exec, system, shell_exec, passthru, fsockopen, phpMail , etc.
and place it in your working directory (or wherever the files you want to block are)
I hope I helped
cheers
-
10-21-2007, 01:47 AM #8Junior Guru Wannabe
- Join Date
- Aug 2007
- Posts
- 65