Results 1 to 8 of 8
  1. #1

    * 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.

  2. #2
    Join Date
    Feb 2003
    Location
    AR
    Posts
    2,381
    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

  3. #3
    Quote Originally Posted by kcackler View Post
    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
    Yes I know that they could access it and change it but I am going to be hosting scripts, like phpBB, SMF, PHP Fusion and wont give them access via FTP or file manager. So they wouldnt be able to touch the .htaccess

  4. #4
    Join Date
    Feb 2003
    Location
    AR
    Posts
    2,381
    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...

  5. #5
    Dang, oh well. Thanks anyways

  6. #6
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,342
    Quote Originally Posted by kcackler View Post
    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...
    I do not think that someone on a shared hosting plan can open a forum hosting service (since the service itself needs admin controls).

    Peace,
    Testing 1.. Testing 1..2.. Testing 1..2..3...

  7. #7
    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

  8. #8
    Quote Originally Posted by triXtyle View Post
    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
    Okay, great. I will give it a try

  9. Newsletters

    Subscribe Now & Get The WHT Quick Start Guide!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •