Secure PHP script folder

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Personne

    Secure PHP script folder

    Hello guys,

    This is my first post here, and I think my problem is very basic. I
    just start programming in PHP/Mysql a month ago. Please be nice.

    Plafeform is Windows 2000 with EasyPHP1.7 (if you know it)

    I have a www folder where a created a test.html file which contains a
    FORM:

    <form name="form3" method="post" action="test.ph p">
    <input name="test" type="submit" id="test" value="test">
    </form>

    My test.php scrip is in the same folder as my test.html, and it works
    fine like this.

    But I know if I keep it this way, people from internet can steal my
    php script which I do not want to happen.

    Then I understood I can move my test.php to a non public folder like
    cgi-bin or a 'include' folder.

    When I do so, here is what happen: Not Found
    The requested URL /Wartools/test.php was not found on this server.

    Apache/1.3.27 Server at 127.0.0.1 Port 80

    I did modify my php.ini like this
    ; Windows: "\path1;\pa th2"
    include_path = ".;C:\Progr am Files\EasyPHP1-7\php\include\"

    but it still doesn't work, indeed I moved test.php in this C:\Program
    Files\EasyPHP1-7\php\include\

    Thank for your help
    Personne


  • Stephen

    #2
    Re: Secure PHP script folder

    If you are using require then make sure that you establish a full path
    to the file -- in windows you would need to start from the C:/
    directory and build from there.

    Also -- if your webserver is parsing PHP documents then people will not
    be able to steal them -- they will simply see the HTML results that are
    spit out by the PHP.

    Stephen Johnson
    stephen@thelone coder.com
    The owner of this domain has not yet uploaded their website.


    Comment

    Working...