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.

PHP Uploading Script blocking files with certain file extensions

Discussion in 'General Discussion' started by cummings, Jun 7, 2006.

  1. cummings

    cummings Registered

    Joined:
    Jul 6, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    A client is attempting to create a PHP file upload script, but is only partly successful because PHP refuses to upload files with particular extensions. Examples include .jpg, .mp3, .png, etc. The client can, however, upload files with .txt, .html, .css, etc. I've already searched through Php.ini and increased the file upload limit, but the problem still exsists. I am assuming there is some configuration file that specifically limits the upload of files with certain extensions, but I am unsure of its location, if it exsists at all. Any assistance would be greatly welcome. Thank you so much.

    Regards,
    Chad
     
  2. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    Do you have mod_security enabled? It can cause problems with uploads and can be configured to check uploads as well.
     
  3. cummings

    cummings Registered

    Joined:
    Jul 6, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I don't think so. I've seached httpd.conf, and mod_security isn't enabled.
     
    #3 cummings, Jun 7, 2006
    Last edited: Jun 7, 2006
  4. flash7

    flash7 Well-Known Member

    Joined:
    Feb 16, 2004
    Messages:
    203
    Likes Received:
    0
    Trophy Points:
    16
    Yep, same problem on my server :eek:
     
  5. laborspy

    laborspy Well-Known Member

    Joined:
    Feb 7, 2004
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Careful...You don't always need to see it in the httpd.conf for it to be enabled. Make sure you also look for modsec.conf "grep modsec.conf httpd.conf".
     
  6. cummings

    cummings Registered

    Joined:
    Jul 6, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Nope, modsec.conf isn't present in my httpd.conf file.
     
Loading...

Share This Page