Secure PHP script folder

This is a discussion on Secure PHP script folder within the PHP Language forums, part of the PHP Programming Forums category; Hello guys, This is my first post here, and I think my problem is very basic. I just start programming ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-02-2005
Personne
 
Posts: n/a
Default 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.php">
<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;\path2"
include_path = ".;C:\Program 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


Reply With Quote
  #2 (permalink)  
Old 03-03-2005
Stephen
 
Posts: n/a
Default 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@thelonecoder.com
http://www.thelonecoder.com

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:38 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0