lazy saunter

(personal learnings in computation)

Tuesday, April 17, 2007

accessing files (from the web) not under the web root, part 2: text files

here's a second situation that surfaced:

users would enter data into a form web page and this data would be stored so that an admin could visit another page and see all the data entered. because users were entering only first name, last name, and email address, there was no need for the complexity of storing this data in a database. however, when stored in a text file under web root, anyone on the web could find the directory and view the data. obviously, only admin should have access to it. also, in this case, the PHP parser would not be able to hide the contents of the file from regular users.

this data file Had to be stored outside of web root and the solution was as with the PHP files outside of the web root: make the directory storing it executable by apache and make the file itself readable and writable by apache.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home