Results 1 to 4 of 4

Thread: Security Risk in php

  1. #1
    amberlong83
    Guest
    Hello

    Any one can please help me with my php security problem.

    Actully I want to create an application that stores stuff in the same folder where the php script runs from.

    I know that this could be quite a security risk, and any one please help me for minimize this risk.


    Thanks in Advence!

  2. Internet, Programming and Graphics   -   #2
    xuxoxux's Avatar Reader BT Rep: +4
    Join Date
    Nov 2008
    Location
    127.0.0.1
    Posts
    226
    Errrr....just strip all input of anything that can cause trouble.
    That is all I can say without actually seeing the script......

  3. Internet, Programming and Graphics   -   #3
    tesco's Avatar woowoo
    Join Date
    Aug 2003
    Location
    Canadia
    Posts
    21,664
    While I'm not an expert with the security of files, I am pretty sure that what you've heard about writing files in the same directory as your php script is true.

    I'm not exactly sure what you're trying to do, since you didn't say, but have you considered just writing into a subfolder then using rewrite rules (apache mod_rewrite) to allow web access from the folder you want?

    Example store file "dog.jpg" in root\uploads\, but allow access from root\dog.jpg in a user's browser

  4. Internet, Programming and Graphics   -   #4
    $SnoopDo2G$'s Avatar Don Doggy BT Rep: +6BT Rep +6
    Join Date
    Dec 2006
    Location
    The Cape of Good Hope
    Posts
    792
    and sensible folders should have access only trough .htaccess .htpasswd

Bookmarks

Posting Permissions

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