The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

.htaccess format

Discussion in 'General Discussion' started by macomb, Mar 27, 2007.

  1. macomb

    macomb Member

    Joined:
    Mar 5, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    A script, to prevent click fraud, consists of two files, One is a php file which interfaces with a sql db which seems to have setup ok from the panel. The other file is a .htaccess file. Are the following workable entries for an .htaccess file on the server?:

    AddType application/x-httpd-php .php .html .htm
    php_value auto_prepend_file \"adsenselock.php\"

    Getting the dreaded "500 error while
    trying to use an ErrorDocument to handle the request".
     
  2. pross

    pross Well-Known Member

    Joined:
    Mar 14, 2005
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    my guess is it should be like:

    php_value auto_prepend_file adsenselock.php

    BUT if you have phpsuexec enabled you will get a 500 error using a php command inside a htaccess file...
     
  3. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    With that error being generated, I suspect your server is running either phpSuExec or SuPHP.

    SuPHP and phpSuExec DO NOT support PHP override commands from .HTACCESS files
    and putting any php configuration commands in your .HTACCESS will cause an error 500.
     
Loading...

Share This Page